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

Align extended Boolean parsing with Elasticsearch #798

Closed
jbaiera opened this issue Jun 29, 2016 · 1 comment
Closed

Align extended Boolean parsing with Elasticsearch #798

jbaiera opened this issue Jun 29, 2016 · 1 comment

Comments

@jbaiera
Copy link
Member

jbaiera commented Jun 29, 2016

As it stands, the boolean parsing in ES-Hadoop checks for values true, on, yes, and 1, with all other values being false. Elasticsearch defines it's logic as false, off, no, and 0, with all other values being true.

This means the ES-Hadoop is biased towards parsing booleans as false, whereas Elasticsearch is biased towards parsing booleans as true. For instance, if a field is mapped as a boolean, and a document with the value "blah" is indexed, in Elasticsearch, this would be treated as a true value, whereas in ES-Hadoop's extended boolean parsing, we would treat this as a false value.

@jbaiera
Copy link
Member Author

jbaiera commented Jun 29, 2016

Additionally, Elasticsearch will directly treat any numeric field as a potential boolean, with any floating point values coerced to integral types and all non zero integral values being true and all zero integral values being false.

This is handled outside of the Booleans class in Elasticsearch core, and so it will be left out of this issue and is fixed with issue #795 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants