The Search group on groups.drupal.org has been pretty quiet lately... But actually, a lot has been happening in the Core Search module for Drupal 8, and I realized maybe I should make a post here. Please read on, we can use some help! (And, things are much better than they have been for Search in past versions of Drupal Core!).
So... I just wanted to draw your attention to a few developments:
Maintainers!
The Search module has maintainers again! Peter Wolanin (pwolanin) and I agreed a while ago to be the official maintainers, and are now listed in the core MAINTAINERS.txt file.
Architecture totally redone!
Thanks to Peter and several other Drupal Core developers, the architecture of Drupal 5/6/7 hooks related to search has been completely redone, and in Drupal 8, Search looks like this:
- Modules can define one or more Search Plugins, which are discovered by the core Search module via the usual Drupal 8 "annotation" discovery method (which basically means you define a class in the right namespace, with an annotation header, and Drupal will notice it as being a Search plugin).
- On the Search settings page, an admin can configure one or more Search Pages for each Search Plugin that a module has defined. Each Search Page has a tab title, a URL (search/whatever), and maybe some configuration settings that are specific to the plugin.
- When you go to /search, or use the provided Search block, you end up at your defined default Search Page, where you can search according to however that Plugin defines searching.
- Core provides Node and User search plugins (as it always have, and they work pretty much the same as they always have).
This should be (hopefully!) a lot more flexible than things were in Drupal 7 and earlier, where a module could only define one search page with a fixed URL (and prior to 7, you couldn't even turn off individual search pages). The Search module has no preconceived notions about how searching should take place, only that a search page exists at "search/something" URL and that it has a keyword field (but this can even be optional, since the plugin has the opportunity to override the searchIsExecutable method).
Anyway... I don't want to get into any more details of the API here.
Manageable issue queue!
I've been going through the issues for the Search module, and I have it down to only 2 pages of open Drupal 6, 7, and 8 issues, mostly just by merging duplicates and testing really old issues to see which versions they still apply to if any. Plus, we've been working hard at fixing some of the bugs.
We need your help!
So, here's where you come in! You can help by doing one or more of the following:
a) Look through the list of open Search issues. Concentrate on Drupal 8 (hopefully), or 7 if you prefer. If you have ideas, comment on the issues.
b) There are several issues there with patches marked "Needs review" -- they could really use your input. Test the patches, review the code, and if all is well, mark them Reviewed and Tested by the Community (hopefully); otherwise, "Needs work". Either way, it's very helpful!
c) Or if you would like to do some coding yourself, pick an issue that doesn't yet have a viable patch, or whose 8.x patch needs porting back to Drupal 7, and go for it! I think we have things fairly well organized and prioritized, and I am regularly watching the issues there, so if you put up a patch, it should be reviewed in a timely manner.
d) Download the latest Drupal 8 and test out search! If you find problems, please check the list of issues currently in the queue and see if we already know about it, and file an issue if we don't.
Thanks -- hope to see you in the issue queue!
