While seeing why #1457256: Enable Lite Pager On Project Issues Advanced Search wasn't helping, I found out that search_api_views needs to support pager->use_count_query(). Patches coming up.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2135363-4--skip_count_query.patch | 3 KB | drunken monkey |
| #1 | 2135363-search_api.diff | 1.5 KB | drumm |
| #1 | 2135363-search_api_db-no-test.diff | 723 bytes | drumm |
Comments
Comment #1
drummIn 2135363-search_api.diff:
TRUEfor non-Views-related queries.use_count_query()isTRUE. This leaves the current page number correct when using views_litepager.In 2135363-search_api_db-no-test.diff
This uses the option made available by the first hunk. Note it checks with
!== FALSEbecause there isn't a default value. I'm guessing the following logic may need to be rearranged instead of the$results['result count'] = TRUE;hack.Comment #3
drummComment #4
drunken monkeySearchApiQueryInterface::getOptionhas a$defaultparameter that does just that.An optional setting defaulting to
TRUEis always a bit awkward, though. Maybe we should make itskip count queryinstead? (The use of underscores vs. spaces in option names sadly isn't really unified, but I think we should stick to a non-namespaced option name without spaces here.) Or, better still,skip result count, since that's less database-centric.In any case, the option will have to be documented in the query interface.
Patch attached that adds these two changes.
For the database module, I've created a separate issue (#2135595: Add support for the new "skip result count" option). (But by the way,
do-not-testis the suffix for skipping the test bot for a patch file.)Comment #5
drummLooks good.
Comment #6
drunken monkeyGood to hear. Committed.
Thanks again!
Comment #7
drunken monkeyDidn't look good at all, actually:
I'm pretty sure there is a negation missing here, so the logic is exactly the wrong way round.
Committed the trivial fix, should work now in dev.