Skip to content
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

[data.search] track_total_hits=true being sent in search request #212946

Closed
lukasolson opened this issue Mar 3, 2025 · 1 comment · Fixed by #215245
Closed

[data.search] track_total_hits=true being sent in search request #212946

lukasolson opened this issue Mar 3, 2025 · 1 comment · Fixed by #215245
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@lukasolson
Copy link
Member

Kibana version: 9.1.0

Describe the bug:

The data.search APIs are sending track_total_hits=true in search requests, even when the consumer passes track_total_hits=false. This started in #208776.

Steps to reproduce:

  1. Add the following to the yml to log Elasticsearch requests:
logging:
  loggers:
    - name: elasticsearch.query
      level: debug
  1. Open Discover & let it load
  2. Open the Inspect dialog, select the "Documents" view, and select the "Request" view

Notice that the request contains track_total_hits=false. However if you find the corresponding request in the Kibana server logs, it shows that the actual request being sent to Elasticsearch contains track_total_hits=true.

Expected behavior:

  1. The inspector shows the actual request that is being sent to ES (right now it isn't)
  2. track_total_hits=false is properly being forwarded to the server & sent to ES

Any additional context:

It looks like the following code is not properly getting the track_total_hits parameter from the client:

@lukasolson lukasolson added bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Mar 3, 2025
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants