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] get max_result_window and max_inner_result_window from index settings #53500

Merged
merged 19 commits into from
Jan 2, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Dec 18, 2019

This PR updates _search requests to use max_result_window value from index rather then hard coded 10000 limit.

Screen Shot 2019-12-18 at 2 58 12 PM

max_inner_result_window used to allow users to configure larger number of top hits.

Screen Shot 2019-12-18 at 3 35 35 PM

To test, increase, or decrease, max_result_window with the following command.

PUT /kibana_sample_data_logs/_settings
{
  "index.max_result_window" : "15000"
}

@nreese nreese added WIP Work in progress release_note:fix [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.6.0 labels Dec 18, 2019
@elasticmachine
Copy link
Contributor

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

@nreese nreese removed the WIP Work in progress label Dec 18, 2019
@nreese
Copy link
Contributor Author

nreese commented Dec 18, 2019

One problem with pulling max_result_window from indexSettings is that users can have read access to the index without having read access to index settings. Index settings read access requires view_index_metadata role. In these cases, users will be defaulted to static value like the current behavior.

@nreese nreese requested a review from kindsun December 18, 2019 22:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs (Team:Docs)

docs/maps/maps-aggregations.asciidoc Outdated Show resolved Hide resolved
docs/maps/vector-layer.asciidoc Outdated Show resolved Hide resolved
@nreese nreese requested a review from a team as a code owner December 19, 2019 22:01
@jsanz
Copy link
Member

jsanz commented Dec 23, 2019

Tested both (chromium and firefox) to push the limit of 10K but also to restrict and works nicely on both cases. Great to see how far the Maps application can go.

2019-12-23-115457_3840x1200_scrot

@nreese
Copy link
Contributor Author

nreese commented Dec 26, 2019

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@elastic elastic deleted a comment from elasticmachine Dec 26, 2019
@kibanamachine
Copy link
Contributor

💔 Build Failed

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

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.

some minor comments.

@nreese
Copy link
Contributor Author

nreese commented Jan 2, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

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.

thx. this is a nice pathway for making the 10k limit configurable 🎩 . It is an approach which doesn't clash with underlying es-cluster settings.

export async function loadIndexSettings(indexPatternTitle) {
if (indexSettings.has(indexPatternTitle)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

good call caching the promise, not the result.

@nreese nreese merged commit 47e5342 into elastic:master Jan 2, 2020
nreese added a commit to nreese/kibana that referenced this pull request Jan 2, 2020
…ettings (elastic#53500)

* [Maps] pull ES_SIZE_LIMIT and top hits limit from index settings

* get fetch working

* get min values from indicies response

* use indexSettings.maxResultWindow in documents request size

* use max_inner_result_window to define top hits max

* update jest test

* update docs

* more docs changes for top hits

* fix line spacing

* Update docs/maps/maps-aggregations.asciidoc

Co-Authored-By: gchaps <[email protected]>

* Update docs/maps/vector-layer.asciidoc

Co-Authored-By: gchaps <[email protected]>

* add api integration test for indexSettings route

* eslint fixes

* review feedback

* display toast on first index settings fetch failure

* clean up

Co-authored-by: gchaps <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
nreese added a commit that referenced this pull request Jan 2, 2020
…ettings (#53500) (#53902)

* [Maps] pull ES_SIZE_LIMIT and top hits limit from index settings

* get fetch working

* get min values from indicies response

* use indexSettings.maxResultWindow in documents request size

* use max_inner_result_window to define top hits max

* update jest test

* update docs

* more docs changes for top hits

* fix line spacing

* Update docs/maps/maps-aggregations.asciidoc

Co-Authored-By: gchaps <[email protected]>

* Update docs/maps/vector-layer.asciidoc

Co-Authored-By: gchaps <[email protected]>

* add api integration test for indexSettings route

* eslint fixes

* review feedback

* display toast on first index settings fetch failure

* clean up

Co-authored-by: gchaps <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: gchaps <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 3, 2020
* master:
  Rename `/api/security/oidc` to `/api/security/oidc/callback`. (elastic#53886)
  Updating transitive dependencies to use [email protected] (elastic#53899)
  [Reporting/Tests] consolidate functional test configs (elastic#52671)
  [Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (elastic#52833)
  [Test/Newsfeed] Re-enable test and add news item to be filtered (elastic#53905)
  cleanup server-log action (elastic#53326)
  [Uptime] Delete uptime eslint rule skip (elastic#50912)
  [skip-ci] Expression Lifecycle Docs (elastic#51494)
  [Endpoint] add react router to endpoint app (elastic#53808)
  [SIEM][Detection Engine] Silence 409 errors on signal creation (elastic#53859)
  [Maps] get max_result_window and max_inner_result_window from index settings (elastic#53500)
  [ML] New Platform server shim: update analytics routes to use new platform router (elastic#53521)
  fixes typo on engine detection page (elastic#53877)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 3, 2020
* master:
  Rename `/api/security/oidc` to `/api/security/oidc/callback`. (elastic#53886)
  Updating transitive dependencies to use [email protected] (elastic#53899)
  [Reporting/Tests] consolidate functional test configs (elastic#52671)
  [Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (elastic#52833)
  [Test/Newsfeed] Re-enable test and add news item to be filtered (elastic#53905)
  cleanup server-log action (elastic#53326)
  [Uptime] Delete uptime eslint rule skip (elastic#50912)
  [skip-ci] Expression Lifecycle Docs (elastic#51494)
  [Endpoint] add react router to endpoint app (elastic#53808)
  [SIEM][Detection Engine] Silence 409 errors on signal creation (elastic#53859)
  [Maps] get max_result_window and max_inner_result_window from index settings (elastic#53500)
  [ML] New Platform server shim: update analytics routes to use new platform router (elastic#53521)
  fixes typo on engine detection page (elastic#53877)
  [Maps] push mapbox value extraction from VectorStyle and into DynamicStyleProperty (elastic#53806)
  Fix suggested value for time_zone in range query (elastic#53841)
  Clean up generic hooks, use react-use instead (elastic#53822)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 3, 2020
…ris/kibana into alerting/created_at-and-updated_at

* 'alerting/created_at-and-updated_at' of github.com:gmmorris/kibana:
  Rename `/api/security/oidc` to `/api/security/oidc/callback`. (elastic#53886)
  Updating transitive dependencies to use [email protected] (elastic#53899)
  [Reporting/Tests] consolidate functional test configs (elastic#52671)
  [Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (elastic#52833)
  [Test/Newsfeed] Re-enable test and add news item to be filtered (elastic#53905)
  cleanup server-log action (elastic#53326)
  [Uptime] Delete uptime eslint rule skip (elastic#50912)
  [skip-ci] Expression Lifecycle Docs (elastic#51494)
  [Endpoint] add react router to endpoint app (elastic#53808)
  [SIEM][Detection Engine] Silence 409 errors on signal creation (elastic#53859)
  [Maps] get max_result_window and max_inner_result_window from index settings (elastic#53500)
  [ML] New Platform server shim: update analytics routes to use new platform router (elastic#53521)
  fixes typo on engine detection page (elastic#53877)
  [Maps] push mapbox value extraction from VectorStyle and into DynamicStyleProperty (elastic#53806)
  Fix suggested value for time_zone in range query (elastic#53841)
  Clean up generic hooks, use react-use instead (elastic#53822)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 3, 2020
…t-types

* alerting/created_at-and-updated_at:
  updatedAt should equal createdAt on creation
  Move index patterns: src/legacy/core_plugins/data 👉 src/plugins/data (elastic#53794)
  moved Task Manager server code under "server" directory (elastic#53777)
  Rename `/api/security/oidc` to `/api/security/oidc/callback`. (elastic#53886)
  Updating transitive dependencies to use [email protected] (elastic#53899)
  [Reporting/Tests] consolidate functional test configs (elastic#52671)
  [Reporting] Correct the docvalue_fields params in the search query Download CSV from Dashboard Panel (elastic#52833)
  [Test/Newsfeed] Re-enable test and add news item to be filtered (elastic#53905)
  cleanup server-log action (elastic#53326)
  [Uptime] Delete uptime eslint rule skip (elastic#50912)
  [skip-ci] Expression Lifecycle Docs (elastic#51494)
  [Endpoint] add react router to endpoint app (elastic#53808)
  [SIEM][Detection Engine] Silence 409 errors on signal creation (elastic#53859)
  [Maps] get max_result_window and max_inner_result_window from index settings (elastic#53500)
  [ML] New Platform server shim: update analytics routes to use new platform router (elastic#53521)
  fixes typo on engine detection page (elastic#53877)
  [Maps] push mapbox value extraction from VectorStyle and into DynamicStyleProperty (elastic#53806)
  Fix suggested value for time_zone in range query (elastic#53841)
  Clean up generic hooks, use react-use instead (elastic#53822)
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.

6 participants