Just seen in a @todo
comment: instead of having the "search ID" be just a query option (with, still, a lot of special handling various code), it would make more sense to just have it be a separate property, with getter and setter.
However, the question is whether we need this at all, now that we have display plugins? Instead of setting the search ID, why not just set the display plugin ID? Downside: no display plugin, no results cache. But would/could at least advocate the providing of display plugins by contrib modules.
(Still, though, there could be use cases for having searches cached that aren't displayed anywhere. So, maybe encourage the use of display plugin IDs as search IDs, but don't require it? And provide a method for retrieving a query's display plugin, if one matches?)
Input welcome!
Comment | File | Size | Author |
---|---|---|---|
#6 | 2772829-6--search_id_overhaul.patch | 8.33 KB | drunken monkey |
|
Comments
Comment #2
borisson_I'd love to encourage contrib to work with display plugins instead, that makes sense.
Yes, that sounds sensible. I don't see a lot of usecases to have searches cached that are not displayed tbh.
Comment #3
drunken monkeyHere is a straight-forward implementation of my suggestion, along with a short test.
Comment #5
drunken monkeyComment #6
drunken monkeyRe-roll.
Comment #7
borisson_This is a good change and I'd like to see this get in, however - if you don't mind. I'd like to get facet's tests green again first. This will probably require some refactoring in facets as well.
I'd also like to get feedback from people who maintain other contrib modules, so let's try to ping some people to have a look at this?
Comment #8
swentel CreditAttribution: swentel commentedHmm, so by the looks of this patch, the only thing I'd have to change in search api page is basically removing the 'search id' line, that works for me :) Let me know if I'm interpreting this wrong.
Comment #9
mkalkbrennerI don't think that this patch changes anything for search_api_solr. So feel free to finalize your optimization.
Comment #10
drunken monkeyOK, thanks a lot for your input!
Then I guess I'll just wait for Joris to give his final OK after getting the tests green again.
Comment #12
drunken monkeyGot Joris' OK via IRC, so: committed.
Thanks again for reviewing, everyone!