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

[Maps] do not track total hits for elasticsearch search requests #91754

Merged
merged 18 commits into from
Mar 25, 2021

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Feb 17, 2021

Maps application does not need accurate total hit counts when making _search requests. Not calculating total hit counts will provide a performance boost, https://www.elastic.co/blog/faster-retrieval-of-top-hits-in-elasticsearch-with-block-max-wand.

This PR updates _search requests to set track_total_hits to avoid requesting unneeded total hits precision.

@nreese nreese added release_note:enhancement [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.13.0 labels Feb 17, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese nreese requested a review from a team as a code owner February 17, 2021 23:05
@nreese nreese added chore release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Mar 3, 2021
@nreese nreese requested review from thomasneirynck and removed request for a team March 3, 2021 21:32
@nreese
Copy link
Contributor Author

nreese commented Mar 3, 2021

@thomasneirynck This PR is unblocked and is ready for review

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. Works really well with larger files, and especially since we know support those better with file-upload, it's a nice added bonus.

I would not skip the release note, and list this as an enhancement.

@nreese
Copy link
Contributor Author

nreese commented Mar 4, 2021

@elasticmachine merge upstream

@nreese nreese added release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Mar 4, 2021
@nreese
Copy link
Contributor Author

nreese commented Mar 24, 2021

@elasticmachine merge upstream

@nreese nreese requested a review from a team as a code owner March 24, 2021 19:56
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2nd lgtm will hopefully unblock review-pending status

@thomasneirynck
Copy link
Contributor

thx for this PR. With this a performance improvement for 10k doc-retrieval, we can consider re-introduce the clamped bbox for tiles with incomplete results again #90194

In tandem with the fix for cancelling request (#92069), and passing in metadata about counts and completeness as in this POC (#94811), Maps could greatly improve the end-user experience when working with vector tiles 🤞

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 758 759 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 2.6MB 2.6MB +1.4KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nreese nreese merged commit c5e3e78 into elastic:master Mar 25, 2021
nreese added a commit to nreese/kibana that referenced this pull request Mar 25, 2021
…stic#91754)

* [Maps] do not track total hits for elasticsearch search requests

* set track_total_hits for es_search_source tooltip fetch

* tslint

* searchSource doc updates, set track_total_hits in MVT requests

* revert changes made to searchsourcefields docs

* tslint

* review feedback

* tslint

* remove Hits (Total) from functional tests

* remove sleep in functional test

* tslint

* fix method name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
nreese added a commit that referenced this pull request Mar 25, 2021
) (#95455)

* [Maps] do not track total hits for elasticsearch search requests

* set track_total_hits for es_search_source tooltip fetch

* tslint

* searchSource doc updates, set track_total_hits in MVT requests

* revert changes made to searchsourcefields docs

* tslint

* review feedback

* tslint

* remove Hits (Total) from functional tests

* remove sleep in functional test

* tslint

* fix method name

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants