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] automatically disable filter by bounds for indexes with small doc counts #34456
Conversation
Pinging @elastic/kibana-gis |
cc @alexfrancoeur What do you think about this? |
a7da723
to
8532354
Compare
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a suggestion for shortening the text:
Dynamic data filter disabled
Index "example*" has a small number of documents and does not require filtering.
Turn on dynamic filtering if you expect the number of documents to increase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice touch. I'd expect this to be really useful too for a lot of the user-provide data coming from geojson-upload.
x-pack/plugins/maps/public/shared/layers/sources/es_search_source/create_source_editor.js
Outdated
Show resolved
Hide resolved
this.setState({ | ||
limit: isNaN(sanitizedValue) ? '' : sanitizedValue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for removing cruft
x-pack/plugins/maps/public/shared/layers/sources/es_search_source/constants.js
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/shared/layers/sources/es_search_source/create_source_editor.js
Show resolved
Hide resolved
💚 Build Succeeded |
💚 Build Succeeded |
handler: async (request, h) => { | ||
const { server, query } = request; | ||
|
||
if (!query.index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log a warning to the server-logs? This should never really occur, and if it does, it's unexpected and there is an issue with the stack deployment. Might be helpful to show feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could happen if someone uses the API and does not supply index
query param. Is it worth logging? Consumer of API would get 400 and know something is wrong with the request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callout message looks good.
…doc counts (elastic#34456) * [Maps] automatically disable filter by bounds for indexes with small doc counts * text updates * review feedback * minor text update
…doc counts (elastic#34456) * [Maps] automatically disable filter by bounds for indexes with small doc counts * text updates * review feedback * minor text update
💔 Build Failed |
We have noticed lots of users not properly setting
Dynamically filter for data in the visible map area
for Elasticsearch document sources. This PR detects if an index contains a limited number of documents and then automatically disables filter by bounds when the index would not benefit from bounds filtering. The UI shows a callout to highlight that filter by bounds has been disabled.cc @gchaps Could you please review the callout messaging?
To test, use an index with less than 2000 documents. Run the following command in console to load an ES index with just a single document