Skip to content

Commit

Permalink
[Discover] Don't track total hits for "View all matches" button (#181811
Browse files Browse the repository at this point in the history
)

## Summary

This PR disables the default behaviour of tracking total hits. This
should make the request faster.

Before:
<img width="759" alt="Screenshot 2024-04-26 at 10 52 41"
src="https://github.com/elastic/kibana/assets/1415710/250e3538-0607-460e-b5b1-3d81a29a391c">

After:
<img width="768" alt="Screenshot 2024-04-26 at 10 58 50"
src="https://github.com/elastic/kibana/assets/1415710/76ce7bdf-918b-48ba-ad5a-c1459d6931b2">
  • Loading branch information
jughosta authored Apr 29, 2024
1 parent 6104bc9 commit c96a560
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ async function fetchDocumentsTimeRange({
params: {
index: dataView.getIndexPattern(),
size: 0,
track_total_hits: false,
body: {
query: dslQuery ?? { match_all: {} },
aggs: {
Expand Down

0 comments on commit c96a560

Please sign in to comment.