Skip to content

Conversation

@orangejulius
Copy link
Member

@orangejulius orangejulius commented Oct 15, 2025

A few versions ago, Elasticsearch introduced an optimization where they only approximate the total hit count for a query (max of 10,000).

It's of course nice to get better performance, but having hit count information is also super useful to examine queries for our own optimization.

This change allows us to enable the track_total_hits flag on ES queries, with the similar api.trackTotalHits boolean in pelias.json.

A few versions ago, Elasticsearch introduced an optimization where they
only approximate the total hit count for a query (max of 10,000).

It's of course nice to get better performance, but having hit count
information is also super useful to examine queries for our own
optimization.

This change allows us to enable the [`track_total_hits`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search#operation-search-track_total_hits) flag on ES
queries, with the similar `api.trackTotalHits` boolean in
`pelias.json`.
@orangejulius orangejulius merged commit 1f921d5 into master Oct 15, 2025
6 checks passed
@orangejulius orangejulius deleted the track_total_hits branch October 15, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants