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

Indication of the search language currently used (KQL, Lucene) #30277

Closed
AlonaNadler opened this issue Feb 6, 2019 · 12 comments
Closed

Indication of the search language currently used (KQL, Lucene) #30277

AlonaNadler opened this issue Feb 6, 2019 · 12 comments
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@AlonaNadler
Copy link

Currently, users need to go to the options next to the search bar in order to switch between KQL and Lucene, it is also the only way to know which language they are currently using.

feb-06-2019 09-42-51

Describe the feature: As preparation for moving to use KQL by default, add an indication visible in the search bar to whether the search bar is using KQL or Lucene without the need to select options link

@elastic/kibana-design

@AlonaNadler AlonaNadler added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Feb 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@cchaos
Copy link
Contributor

cchaos commented Feb 6, 2019

Currently the placeholder text looks like:

screen shot 2019-02-06 at 13 11 39 pm

For both KQL and Lucene.

You could just change it to lead in with KQL search... and Lucene search....

Also we might want to decrease the footprint of the options link and use a gear icon instead.

@AlonaNadler
Copy link
Author

Can we somehow place it next to the options link to make it more actionable, currently options is the place to switch between this too, it might be more descriptive that way

@Bargs
Copy link
Contributor

Bargs commented Feb 7, 2019

@cchaos another thing I just thought of is if we only put it in the placeholder, there will still be no visual indication of which language is in use when the input is already populated with text (e.g. loading a saved search)

@AlonaNadler
Copy link
Author

This morning I spoke with a user who wasn't aware he was using KQL and was pasting the search bar query into filter aggregation (Lucene) without luck or understanding what is wrong.
We might need to be explicit in the filter aggregation that it is only using Lucene

@Bargs
Copy link
Contributor

Bargs commented Feb 9, 2019

If we used the gear icon and got rid of the "options" text there would be some space to make the language name part of the button itself. What does everyone think of something like this?

screen shot 2019-02-08 at 7 26 05 pm
screen shot 2019-02-08 at 7 26 16 pm

@AlonaNadler
Copy link
Author

@Bargs good idea I'm good with the plan 👍

@cchaos
Copy link
Contributor

cchaos commented Feb 11, 2019

My only concern is how much space we're losing in the query bar for that toggle (which really will probably only be clicked once).

image

if we only put it in the placeholder, there will still be no visual indication of which language is in use when the input is already populated with text (e.g. loading a saved search)

Wouldn't they be able to tell by the syntax?

@Bargs
Copy link
Contributor

Bargs commented Feb 11, 2019

@cchaos the syntax is almost identical in most cases. For example response:200 AND extension:jpg is a valid query in both lucene and KQL.

@snide
Copy link
Contributor

snide commented Feb 11, 2019

image

If KQL is the new default, I'd drop the extranous first icon (it serves no purpose). I'd remove the placeholder text, which isn't needed now that KQL explains the syntax. I'd then just make "options" into the name of the active syntax language ("KQL" for default). You'll get extra room with the removal of the icon and KQL will likely always be the case these days, so you'll gain some space there as well.

I don't think most people know what "e.g" means, and the extra parens needed make it confusing to know what part of that placeholder is real syntax and what isn't. I think it's better to just let people learn it through KQL autocomplete since it does a great job of showing you the ropes.

@Bargs
Copy link
Contributor

Bargs commented Feb 12, 2019

@snide the only snag there is that autocomplete only works with a Basic license or above.

@Bargs
Copy link
Contributor

Bargs commented Feb 12, 2019

Put up a PR with Dave's suggestions #30899

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

No branches or pull requests

5 participants