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

Deprecate Bool query's adjust_pure_negative parameter? #49530

Closed
markharwood opened this issue Nov 25, 2019 · 2 comments · Fixed by #49543
Closed

Deprecate Bool query's adjust_pure_negative parameter? #49530

markharwood opened this issue Nov 25, 2019 · 2 comments · Fixed by #49543
Assignees
Labels
:Search/Search Search-related issues that do not fall into other categories

Comments

@markharwood
Copy link
Contributor

markharwood commented Nov 25, 2019

Is there ever any good reason to have adjust_pure_negative set to false?

We don't think so which is why we don't document this flag and yet it confuses people when it appears.

If there is a use case where users need this option we could keep it as an escape hatch but should instead work to remove examples of requests that needlessly include the default value of adjust_pure_negative:true.
I could only find one example of this in Kibana code (an ML example) but in elasticsearch we do serialize Bool queries to XContent with the default value.

@markharwood markharwood added :Search/Search Search-related issues that do not fall into other categories >deprecation labels Nov 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

markharwood added a commit to markharwood/elasticsearch that referenced this issue Nov 25, 2019
…ublicise a setting that we don’t document or encourage people to use.

Closes elastic#49530
@markharwood
Copy link
Contributor Author

We discussed this internally and decided that we shouldn't deprecate this flag but should

  1. Remove the rendering of the default value in toXContent calls (see BoolQueryBuilder - remove adjust_pure_negative:true from XContent rendering #49543) and
  2. Add a small note to bool query docs describing the flag (although probably very de-emphasised because the vast majority of users will only want to use the default choice)

@markharwood markharwood self-assigned this Dec 2, 2019
markharwood added a commit to markharwood/elasticsearch that referenced this issue Dec 5, 2019
…ves to publicise a setting that we don’t document or encourage people to use.

Closes elastic#49530
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this issue Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories
Projects
None yet
2 participants