-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[KQL] Should wildcard queries default to case-insensitive search? #80591
Comments
No easy answers here: option a) option b) option c) I don't think KQL/Lucene Query string should seek to expose all the search options available in Lucene - there are ways to resolve these syntaxes' shortcomings which I will address elsewhere. I'd root for option A - or maybe make case insensitivity an index-time decision by adding the option for normalizers to the wildcard field (cc @jimczi ) |
@markharwood thanks for the response. It seems like your main concern is that users should be able to choose when to use case-insensitive search, or at least to disable it. What if, instead of adding it to KQL, we added a wildcard query to the Kibana filters editor? It's a more form-based way of building filters and could have a checkbox asking if users want to do a case-insensitive search. |
Hard agree that graphical clause editors (aka filter panels) are the way to simplify the complexity in clause options. Sadly, the challenge for Kibana is that filter pills can only be ANDed together. The only way of orchestrating custom assemblies of AND/OR logic is currently through text-based KQL. This is why I've been advocating graphical Boolean query builders for some time |
I got multiple issues with the fact Kibana is case sensitive. There are few use cases where it is important but for most users it's an obstacle requires them to know how exactly the value was entered. I prefer option A
And introduce an advance setting that allows to turn that off cc: @elastic-jb |
If we can't make the off switch an inline per-query-clause we need to consider the other possible scopes:
While case sensitivity is not typically important for text it can matter for machine-facing content like
We may want to be careful about simply introducing a Kibana-wide switch. |
I am option A also. I think the scope question is interesting. Could it be a per-space setting instead of Kibana wide? I was hit by this quite a few times recently working on a demo using NBA data. LeBron James' capital B kept tripping me up. Even after I was aware of it, I still sometimes didn't capitalize the B here and there, and the results were empty. More inclusive feels like a better default. |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
Hello! Is this issue related that i can do this in dev console:
but not in kibana in the KQL bar: the message field is set as wilcard type. |
Closing this because it's not planned to be resolved in the foreseeable future. It will be tracked in our Icebox and will be re-opened if our priorities change. Feel free to re-open if you think it should be melted sooner. |
Starting in 7.10, Elasticsearch supports an option to set
case_insensitive: true
on thewildcard
search query. This works internally by rewriting the searches to regular expressions that match upper and lower case characters.Options for how to expose this
a. Set this flag to be the default in all KQL wildcard searches, without changing the KQL grammar. This has some potential performance issues as described in a comment by @markharwood in the related issue about
wildcard
fields:b. Only set this flag by default when the user is running wildcard query on
wildcard
type fields. This would be the most performant option, but it would potentially be confusing to have two different behaviors.c. Add something to the KQL grammar, like this request to add an UPPER() function to KQL. This could let users enable case insensitive queries as needed. I don't have a proposed grammar.
cc @elastic/kibana-app-arch @markharwood
The text was updated successfully, but these errors were encountered: