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

Controls visualization should use time filter #14659

Closed
shaharmor opened this issue Oct 29, 2017 · 11 comments
Closed

Controls visualization should use time filter #14659

shaharmor opened this issue Oct 29, 2017 · 11 comments
Assignees
Labels
Feature:Input Control Input controls visualization feedback_needed Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@shaharmor
Copy link
Contributor

Describe the feature:

Add a configuration option to the controls visualization to only query the last X indices.
When you have a huge number of indices it can take a long time to query all the terms

@epixa
Copy link
Contributor

epixa commented Nov 20, 2017

Can you explain a little more about what you're use case for this is? Beginning in 5.6, Elasticsearch will automatically optimize search requests when there are lots of potential indices to search through (it's technically shard-based), so you shouldn't get much of a performance penalty. Does that address your problem?

@shaharmor shaharmor changed the title Controls visualization should only query X last indices Controls visualization should use time filter Nov 20, 2017
@shaharmor
Copy link
Contributor Author

shaharmor commented Nov 20, 2017

No it doesn't.

When you add a controls vis, choose "options list", select an index patten, select a field, click play -> it makes a request to ES without any time filter, which means that the search will go to all indices that match the index pattern.

In situations where you have a lot of indices (For example index per day/hour or something), it will take a lot of time for query to return.

An option to limit the time frame the query is using will make ES skip most of the shards

@nreese
Copy link
Contributor

nreese commented Nov 21, 2017

A filter by time configuration option could be added to each control. When this is enabled, the active kibana time range would be applied when fetching terms or min/max for range control. Would this solve your problem?

Would you expect the terms and min/max to update if the kibana time range is changed?

Nathan

@shaharmor
Copy link
Contributor Author

Yup, exactly.

It would also be good to be able to set hardcoded limits on the date range for the controls vis, because if a user runs a query for the past year or so, I'd prefer to only show him filters from the past week for example and save the load from ES.

@nreese
Copy link
Contributor

nreese commented Nov 22, 2017

@stacey-gammon @kobelb What are your thoughts about setting a hardcoded date range in the controls vis? There is another open issue about allowing dashboard panels to specify a date range independent of the kibana time range.

Is this something that should be implemented specific to input controls or would it be worth pursuing panel specific time ranges to satisfy the issue highlighted by this request?

@nreese nreese self-assigned this Nov 22, 2017
@stacey-gammon
Copy link
Contributor

I think we should make date ranges configurable per panel, something we want to do anyway, and sounds like it would cover this use case.

@kobelb
Copy link
Contributor

kobelb commented Nov 22, 2017

@nreese what was the original reasoning for us having the input controls not respect the global time-filter?

@nreese
Copy link
Contributor

nreese commented Nov 22, 2017

@kobelb Input controls were targeted at non technical users. I wanted to avoid confusion by making the list of gathered terms as static as possible. That way, regardless of kibana state - users were presented with the same list of terms and never got stumped because the term they expected to be there was missing due to a time filter.

@epixa
Copy link
Contributor

epixa commented Nov 22, 2017

That way, regardless of kibana state - users were presented with the same list of terms and never got stumped because the term they expected to be there was missing due to a time filter.

I think that's a reasonable idea, but it has some pretty significant problems from a scaling perspective. As a default behavior, this will not scale from a performance perspective to large data sets nor will it scale from a user experience perspective when dealing with data sets with a large number of fields. Perhaps the right solution here is to default to time based and then consider the ability to opt-out of time ranges on a panel by panel basis as @stacey-gammon mentioned.

@nreese
Copy link
Contributor

nreese commented Jan 18, 2018

#15852 added the option to apply the global time range.

Still to come is the ability to specify a time range per for the control panel

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing labels Sep 13, 2018
@nreese
Copy link
Contributor

nreese commented Oct 1, 2019

closed by #43153

@nreese nreese closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Input Control Input controls visualization feedback_needed Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

6 participants