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

[Lens] Support filters aggregation #61330

Closed
timroes opened this issue Mar 25, 2020 · 9 comments · Fixed by #75635
Closed

[Lens] Support filters aggregation #61330

timroes opened this issue Mar 25, 2020 · 9 comments · Fixed by #75635
Assignees
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@timroes
Copy link
Contributor

timroes commented Mar 25, 2020

Lens should support the filters aggregation allowing the user to specify an individual amount of custom KQL/Lucene filters and specify custom labels for them.

Screenshot 2020-08-17 at 16 41 00

Screenshot 2020-08-17 at 16 41 05

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Mar 25, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor Author

timroes commented Mar 25, 2020

@cchaos I think we need some design input on this one. I have the feeling just cramping the same UI we use in the visualize editor into the smaller Lens popup won't really create a good UI. Especially since a user will easily add at least 3-5 filters commonly, which would create a lot of scrolling. Do you think you could provide some mockups that cover this aggregation?

  • Allow specifying filters or query via KQL/Lucene (we can technically work with any of those, so I think we are also open to not have a query bar but filters, if that would end up in better design)
  • Allow providing a label for each individual filter
  • Allow adding/removing of filters
  • Allow resorting of filters, since the order will be the same as in the chart (since ES currently can't sort filter buckets by a specific criteria), and this has been one of the more annoying limitations in visualize editor, that you can never sort those filters again.

Also there are some questions around how those dialog would be initiated. Currently the user would need to trigger that popup from the visualization configuration, since there is nothing for a filter, that you could drag from the index pattern view.

Since this is currently rather high up in the priority list, it would be nice if we could get some mockups for it.

@cchaos

This comment has been minimized.

@timroes
Copy link
Contributor Author

timroes commented Mar 26, 2020

Blazing fast Caroline, as always :-)

Question: would you be able to edit entries again in the dialog or you need to remove and add a new one? Since editing feels a bit weird maybe if there's only that one bar to enter the queries?

@cchaos

This comment has been minimized.

@AlonaNadler
Copy link

Keep in mind there needs to be the ability to switch the order of filter aggregation queries.
I know there are technical challenges displaying each filter under the x-axis separately.
will it help if we have one filter label under the x-axis and make the label large so we will fit details on each individual search queries?
image
instead of this it would say

filter(3):
version 7.x
version 8.x 
people who love apples

@wylieconlon
Copy link
Contributor

@AlonaNadler @cchaos Raising this because I don't think it's been discussed yet: why are we expecting our users to type KQL queries instead of the simplified filter editor that's used in the search bar? I agree that KQL is more powerful, but I thought our target user was less interested in learning a new grammar. Even I find that the KQL docs are confusing.

The other filter editor I'm talking about is this one:

Screen Shot 2020-08-17 at 4 21 25 PM

cc @flash1293 @mbondyra

@flash1293
Copy link
Contributor

flash1293 commented Aug 18, 2020

That's a good point, @wylieconlon - I think we should start with the KQL filter though and branch out other ways of editing.
Two reasons:

  • Technical complexity: This editor is currently not exposed as an easy to consume standalone component. It would require quite some refactoring to make it usable in this place.
  • Limiting the most common use case: I think the most common use case for filters is not to do a field/term match or a range, but using a query composed out of AND and ORs, often to normalize messy data (at least that's how I used it in the past).

@AlonaNadler Do you agree with the second bullet point here or is this a misconception?

@wylieconlon
Copy link
Contributor

Discussed in a meeting and we have decided to go with KQL input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants