elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[data.search] Remove total hits shimming (`legacyHitsTotal`) #186144

Open lukasolson opened 3 weeks ago

lukasolson commented 3 weeks ago

Summary:

A long time ago in an Elastic Stack far, far away, the format that Elasticsearch returned the total number of hits in a search response changed. Prior to the change, the number of hits was always returned, and after the change, you could opt in/out to receiving the exact number of hits vs. a range.

During this period of time, we updated the data.search services to have a property, legacyHitsTotal, to preserve the existing format for the hits count. As that change was a very long time ago, and as we are trying to remove server-side processing of responses to get to a point where we can stream the response directly to the client, we need to remove this special handling. We also need to verify that consumers that are displaying the count don't have any regressions in displaying the counts (or ranges) correctly.

Related: https://github.com/elastic/kibana/issues/55974, https://github.com/elastic/kibana/issues/91742

elasticmachine commented 3 weeks ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)