How do I get more results than the default allowed by ElasticSearch?
-
How do I get more results than the default allowed by ElasticSearch? (10k, as of this question)?
-
You have a few options.
Limit Query
- One option is to find a way to limit your search by logical increments. For example, if you are searching on
users
you may consider obtaining and appending results by first name in a loop.
As an example:
for (letter in [a...z]) { query + " AND user email starts with $letter" // do work }
Use Version
>
1.24.0 when pulling something likeusers
https://fusionauth.io/docs/v1/tech/apis/users/#request-parameters-12
Request Parameters accurateTotal [Boolean] OPTIONAL Defaults to false AVAILABLE SINCE 1.24.0 Set this value equal to true to receive an accurate hit count on the API response. By default the search engine will limit the hit count to 10,000 users. This means that even if your query may match more than 10,000 users, the returned total count will be 10,000. This is adequate for many use cases such as pagination and general purpose queries. If you are looking for an accurate user count that can exceed 10,000 matches, you will want to set this value equal to true.
- One option is to find a way to limit your search by logical increments. For example, if you are searching on