The searchMultiple() method doesn't pass the $fq argument through to $this->getFacetParams() which means that the certain facet queries aren't being altered and passed back as they are in the equivalent search() method, which caused for me at least the Facet I created via the Search API Multi Facetapi sandbox module (that allows facets against Search API multi indexes) to completely break.
I spent a ridiculously long time tracking this issue down, so I hope someone else benefits from this extremely simple fix (patch coming in comment #1)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | search_api_solr-searchMultiple-fix-excerpts-facets.patch | 8.78 KB | krisweinhold |
| #1 | pass_fq-1900644-1.patch | 503 bytes | deciphered |
Comments
Comment #1
decipheredPatch attached (super tiny fix).
Comment #2
krisweinhold commentedThanks for this! There's actually a ton of stuff missing in the searchMultiple() method that has been in the single-index-search method for awhile.
Namely, working search excerpts with highlighting, as well as, properly handled facets. I've been working on using the Search API Multi Facetapi sandbox module as well, and this patch fixes a ton of issues surrounding highlighting/facets on multi-index searches.
Also, if you need to facet on date fields, be sure to pickup this patch too: #1930184: Fix for Date Facets in Multi-Index Search
Comment #3
drunken monkey@ Deciphered: Sorry it took me so long to see this. Thanks for the patch, looks good!
Committed.
@ krisweinhold: Please create a new issue for your patch. It also needs some work: remove the
$spell_insertedstuff (that's would be another separate issue), fix your whitespace (no tabs or trailing whitespace), and please only port code from the normal search method to the multi-index one, without introducing new stuff.It would also be great if you could base your patch on the one in #1846254-6: Remove the SolrPhpClient dependency – I hope very much that one will be committed soon, and this would save us the re-basing/re-rolling.