Closed henrylyne closed 5 years ago
First cut at cursor-based pagination is live. Cursor-based pagination is triggered for queries with results >= 10, 000. Anything less will continue to use pageN
style pagination.
Looks good to me 🚀
Two steps forward...
WTF {u'status': 500, 'mz:timing': 0.005450010299682617, u'error': {u'failed_shards': [{u'node': u'UiD3rPTuR7yokmTm5_npEg', u'index': u'spelunker_20180213', u'reason': {u'reason': u'Result window is too large, from + size must be less than or equal to: [10000] but was [150000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter.', u'type': u'query_phase_execution_exception'}, u'shard': 0}], u'root_cause': [{u'reason': u'Result window is too large, from + size must be less than or equal to: [10000] but was [150000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter.', u'type': u'query_phase_execution_exception'}], u'grouped': True, u'reason': u'all shards failed', u'phase': u'query_fetch', u'type': u'search_phase_execution_exception'}}
https://spelunker.whosonfirst.org/placetypes/locality/?page=3000
Pagination hooks for placetypes. I imagine there are still other queries that need to be accounted for.
Cursor-based pagination has been wired in across the board on the Spelunker.
The Spelunker has also been fully re-indexed (for admin data) as of this morning with the exception of some places in Thailand because of weird ES indexing issues (specifically this place is understood to contain NaN
values which... anyway).
Have a poke around and let me know if anything still seems weird or broken.
Paging through results just keeps showing the first page of results.
https://spelunker.whosonfirst.org/search/?q=newcastle is the same as https://spelunker.whosonfirst.org/search/?q=newcastle&page=2