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

[KQL] Don't put KQL in filter but in Query #86365

Closed
timroes opened this issue Dec 17, 2020 · 1 comment · Fixed by #103727
Closed

[KQL] Don't put KQL in filter but in Query #86365

timroes opened this issue Dec 17, 2020 · 1 comment · Fixed by #103727
Assignees
Labels
Feature:KQL KQL impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort

Comments

@timroes
Copy link
Contributor

timroes commented Dec 17, 2020

Currently when using KQL it will be put into a bool filter and not the query. Thus it's not possible to use KQL input for relevance matching and using it to get a good _score. We would like to improve scoring in Discover (e.g. by sorting by default by score if the user entered a query: #54362), but with KQL this does not work (while it did with Lucene).

I think the consumer of SearchSource.setField('query') should either have control over whether it will be put into filter or query, or always be put into query (and instead use setField('filter') for filters. I see a lot of use-cases where we might want to use KQL purely for filtering and never care about the score, thus I think it would be better to make it configurable by the consumer.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Apr 26, 2021
@lukasolson lukasolson self-assigned this Apr 29, 2021
@petrklapka petrklapka added 1 and removed 1 labels May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:KQL KQL impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants