We can add "search module" function in drush. This function return modules' name, projects name and description which get from page http://drupal.org/search/apachesolr_multisitesearch/Searchtext?page=numb...
The patch "searchmodule-1.patch" can fulfill this requirement which will add new function "search" to drush.
It will create a new folder "searchmodule" under drush/commands/ and two files "searchmodule.drush.inc", "search.sh" under "searchmodule" folder
After apply this patch, please make sure that the shell "search.sh" in drush/commands/searchmodule has executive permission.
We can use command:
drush search SearchText --page=number
to search modules depending on what Searchtext we input, the search result includes modules' name, projects name and description.
We can use argument --page=number (drush search function will set this argument with 0 by default) to decide how many pages of modules we want to show.
Here is the example:
Searchtext: solr (one page)
drush search solr
Searchtext: solr (six pages)
drush search solr --page=6
Search result (example):
Solr (solr)
For the 'official' Solr project, see Apache Solr Search Integration . This module handles integration with Solr - an XML-based front-end to the Lucene search engine - and is a replacement for the core search.module. Call solr.module functions from any module that handles a custom node type (example hook ...
Openlayers Apachesolr Integration (openlayers_solr)
http://drupal.org/project/openlayers ) and apachsolr ( http://drupal.org/project/apachesolr ) with local solr integartion. ... and can be overridden by setting the 'openlayers_solr_map' variable. The real strength of this module ... in solr. This is because of the http://drupal.org/project/geofield. Tutorials Video ...
What is in brackets in the example result above is the project name of module.
Notice:
1. If Searchtext contain space, we need to use "\" to escape space. For example, if we want to search "send email", the whole command is
drush search send\ email
2. " \ ", " ' " and " " " are not allowed in Searchtext
Please feel free to contact me if you have questions about it.
Thanks for using it.
Happy new year!
Cheers
Jing Long
Comment | File | Size | Author |
---|---|---|---|
searchmodule-1.patch | 3.28 KB | jinglong |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedNot in scope for Drush core. Feel free to add as a contrib project
Comment #2
jinglong CreditAttribution: jinglong commentedHi moshe,
Thanks for commenting it.
Can I add search function to PM component?
Cheers
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedNo, not interested in search from commandline until we get a local sqlite database of all projects - #1299332: Provide dependencies to external services like drush