Open valasatava opened 11 months ago
Pinging @elastic/es-search (Team:Search)
This is a dumb question, but are you setting the search_after
parameter in your subsequent search calls?
I would think you should do search_after
and PIT, and don't bother doing the slicing.
Pinging @elastic/es-search-foundations (Team:Search Foundations)
Elasticsearch Version
8.9.1
Installed Plugins
No response
Java Version
20.0.2
OS Version
5.15.0-83-generic elastic/elasticsearch#92-Ubuntu SMP Mon Aug 14 09:30:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
I'm trying to pull results from Elasticsearch with a sort. There can be millions of documents and It's taking a very long time to fetch all of the results. I'm looking for ways to improve the speed.
I implemented sliced scrolls with PIT, and it improves the time, but the results are no longer really sorted. They are only sorted within their own slice, but I need the results to return in sort order.
For example, this search for slice 1
returns first document with ID "006"
and for slice 2 - "001"
Steps to Reproduce
Step 1: mappings
Step 2: index creation
Step 3: opening point-in-time
Step 4: requesting slices
Logs (if relevant)
No response