-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support partial return of results #13
Comments
Note that with newer (5+) versions of ElasticSearch have changed how text fields are indexed. Sorting on the field itself is not supported, but it is possible to search on e.g. (It may be possible to do this with a single field by enabling |
Note for future reference: getting all results of a search (with EDIT: It seems there is a way of doing this by using the |
We need to be able to retrieve results lazily, i.e. a "page" at a time, to avoid long loading times. See also oracc/oracc-search-front-end#11.
ElasticSearch offers several options for getting paged results:
from
andsize
fields; this has a limit (by default 10000, which we may exceed) past which it becomes disallowed, or at least very inefficient.search_after
option seems like the best solution. It requires keeping track of the last result (glossary entry), but does not look too complex to implement. Performance is not clear, as it seems that the search is repeated each time, but that might also be true of the other options.Regardless of the choice, we will also need to extend the search endpoints to accept a field on which to sort.
The text was updated successfully, but these errors were encountered: