When using current search blocks with multiple search indexes I noticed the behavior of current_search_get_default_searcher() was not so good as it just pulled the first key from the array produced by current_search_get_searcher_options().

If you instead allow a $delta variable to be passed to current_search_get_default_searcher() you can pass the same $delta that comes through current_search_get_block_searcher() and use it to determine which search index to use.

This patch adds code for using search_api based indexes.

On a separate note, the blocks created in block_current_search are not exported when you export a current search block via Features.
If these database entries are present, there's no need to do a better job at getting the default searcher, but I found myself not getting the right searcher and it was because I had re-installed a site after exporting the current search blocks with Features.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

caxy4’s picture