Skip to content

Be strict when parsing values searching for booleans #21555

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

Merged
merged 1 commit into from
Nov 15, 2016

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Nov 14, 2016

This changes only the query parsing behavior to be strict when searching on
boolean values. We continue to accept the variety of values during index time,
but searches will only be parsed using "true" or "false".

Resolves #21545

This changes only the query parsing behavior to be strict when searching on
boolean values. We continue to accept the variety of values during index time,
but searches will only be parsed using `"true"` or `"false"`.

Resolves elastic#21545
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@s1monw
Copy link
Contributor

s1monw commented Nov 15, 2016

👍 I wonder if we can think about adding deprecation logging in 5.x for this somehow?

@jpountz
Copy link
Contributor

jpountz commented Nov 15, 2016

That's the plan!

dakrone added a commit to dakrone/elasticsearch that referenced this pull request Nov 15, 2016
Relates to elastic#21555, this is the deprecation logging for what was removed.
dakrone added a commit that referenced this pull request Nov 15, 2016
* Add deprecation logging for lenient boolean queries

Relates to #21555, this is the deprecation logging for what was removed.

* Make logger final and correct misspelled word
@dakrone dakrone merged commit 96122aa into elastic:master Nov 15, 2016
jasontedor added a commit that referenced this pull request Nov 16, 2016
* master: (22 commits)
  Add proper toString() method to UpdateTask (#21582)
  Fix `InternalEngine#isThrottled` to not always return `false`. (#21592)
  add `ignore_missing` option to SplitProcessor (#20982)
  fix trace_match behavior for when there is only one grok pattern (#21413)
  Remove dead code from GetResponse.java
  Fixes date range query using epoch with timezone (#21542)
  Do not cache term queries. (#21566)
  Updated dynamic mapper section
  Docs: Clarify date_histogram bucket sizes for DST time zones
  Handle release of 5.0.1
  Fix skip reason for stats API parameters test
  Reduce skip version for stats API parameter tests
  Strict level parsing for indices stats
  Remove cluster update task when task times out (#21578)
  [DOCS] Mention "all-fields" mode doesn't search across nested documents
  InternalTestCluster: when restarting a node we should validate the cluster is formed via the node we just restarted
  Fixed bad asciidoc in boolean mapping docs
  Fixed bad asciidoc ID in node stats
  Be strict when parsing values searching for booleans (#21555)
  Fix time zone rounding edge case for DST overlaps
  ...
@dakrone dakrone deleted the strict-bool-parsing branch January 23, 2017 17:23
@dcamach0
Copy link

dcamach0 commented Apr 2, 2017

Using RE-INDEX API I got the following error regarding this merge.

"Can't parse boolean value [{format=disabled}], expected [true] or [false]

However there is no boolean field in any document of my index.

@dadoonet
Copy link
Member

dadoonet commented Apr 2, 2017

@bleskes
Copy link
Contributor

bleskes commented Apr 2, 2017

@kmxillo double checking a couple of things - this PR is strict in 6.0 but is a deprecation log in 5.x. Which version are you running against? (6.0 is not yet released). It would be great if you can reproduce it and open a new issue, with the mapping of the index and a document which causes this error? (note that the field value being parsed is {format=disabled}, this may help you pin point the problem)

@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Search/Search Search-related issues that do not fall into other categories v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants