Skip to content

Inconsistency between treating boolean type in aggs and term queries #32069

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

Closed
roytmana opened this issue Jul 15, 2018 · 3 comments
Closed

Inconsistency between treating boolean type in aggs and term queries #32069

roytmana opened this issue Jul 15, 2018 · 3 comments

Comments

@roytmana
Copy link

When aggregating on a boolean field elastic put 0/1 as aggregation key however when performing a term query on the same field using 0/1 values fails with exception. I think it should be consistent either true/false should be used as agg bucket key or term query on a boolean field should accept 0/1 as valid values (in addition to true/false). As it is I can't consistency use aggregation key to produce queries drill down into documents behind a given aggregation

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@jpountz
Copy link
Contributor

jpountz commented Jul 15, 2018

I agree that the fact that aggregations leak the underlying way that data is stored is annoying. For reference I'd like to fix it by replacing the existing key/key_as_string keys in the response with a single key that would contain data in the appropriate type, ie. a formatted string for dates and a boolean for booleans. #18518

@jpountz
Copy link
Contributor

jpountz commented Jul 16, 2018

Closing in favor of #18518

@jpountz jpountz closed this as completed Jul 16, 2018
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

3 participants