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

Can't add Kuery filters from a viz with a linked search in viz editor #14040

Closed
Bargs opened this issue Sep 18, 2017 · 6 comments
Closed

Can't add Kuery filters from a viz with a linked search in viz editor #14040

Bargs opened this issue Sep 18, 2017 · 6 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available)

Comments

@Bargs
Copy link
Contributor

Bargs commented Sep 18, 2017

Kibana version: master, 6.0

Description of the problem including expected versus actual behavior:

When you create a visualization from a saved search, no query bar is displayed in the viz editor. If kuery is selected as the default language in the advanced settings the query in app state will be of type kuery. Clicking visualizations will correctly update the query in app state, but without a query bar there's no way for the user to see this. There seems to be an additional bug somewhere because the vis itself isn't getting filtered either.

kueryfilter

In my opinion, we should display the query bar even if there's a linked search. Search source queries didn't used to get merged. I suspect that's the reason why we hid the query bar before, the query bar would override any query in the linked search. That's no longer the case. All of the queries in a search source inheritance chain get included in the final ES query. So I don't think there's any harm in exposing the query bar when there's a linked search. Then there would be no need to do this because mixed language would work fine.

@ppisljar @lukasolson @thomasneirynck I'd like to get your opinions on this before I move forward.

@Bargs Bargs added :Discovery Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Sep 18, 2017
@lukasolson
Copy link
Member

Would we also show it when Lucene is selected as the query language?

@thomasneirynck
Copy link
Contributor

given that all queries are always interleaved with linked searches. yeah, imho, it would also make sense to show the query bar then.

@Bargs
Copy link
Contributor Author

Bargs commented Sep 18, 2017

@lukasolson yup, I think we should just always show it

@Bargs
Copy link
Contributor Author

Bargs commented Sep 18, 2017

What I'm not sure about, in the lucene scenario, is how unlinking should work. It might be safe to combine two lucene query strings with an AND, but I'm not 100% on that atm. Or we could turn the unlinked query string into a filter? We could also change the behavior of unlinking to throw away the saved search instead of merging it into the current search. It kinda seems like that's what most people would expect anyway?

We could continue to hide the query bar when lucene is selected, but that might be a bit weird. If someone was using kuery but switched to lucene, they couldn't switch back since the switcher would then be hidden.

@Bargs
Copy link
Contributor Author

Bargs commented Sep 18, 2017

It doesn't look like the merging functionality was added as a result of any user request: #2322

@Bargs
Copy link
Contributor Author

Bargs commented Sep 27, 2017

Chatted about this with Lukas on Zoom, we both think it makes sense to throw away the linked search when it is unlinked. We realized another benefit of showing the query bar is that we can remove the refresh button from the top menu, since it only exists for linked searches with no search button. So I'm gonna move forward in that direction and get a PR up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available)
Projects
None yet
Development

No branches or pull requests

3 participants