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
Create dedicated fielddata implementation for boolean fields #4678
Comments
This will ensure that facets and aggregations display them as true/false instead of T/F. Close elastic#4678
@uboness any news on this issue? |
I believe @jpountz did some relevant work |
I still need to figure out whether we actually need a custom boolean field data API, or if only a different implementation would be required (using eg. the numeric API) and customizing the formatting in aggregations like we already do eg. for ip addresses or dates. I would lean towards the latter option. This will also help integration with Lucene APIs and eg. allow to have doc values support without any adapter. |
Also see #7851 |
This pull request makes boolean handled like dates and ipv4 addresses: things are stored as as numerics under the hood and aggregations add some special formatting logic in order to return true/false in addition to 1/0. For example, here is an output of a terms aggregation on a boolean field: ``` "aggregations": { "top_f": { "doc_count_error_upper_bound": 0, "buckets": [ { "key": 0, "key_as_string": "false", "doc_count": 2 }, { "key": 1, "key_as_string": "true", "doc_count": 1 } ] } } ``` Sorted numeric doc values are used under the hood. Close elastic#4678 Close elastic#7851
Just like we have for bytes & numerics, we should have a dedicated field data implementation for boolean values. This will be much more optimized memory-wise and overall performance-wise than what we have today (today, we treat booleans as bytes -
T
&F
)This will also solve the formatting issues in the different APIs (eg. facets & aggregations) where instead of returning
T
&F
we'll be able to returntrue
&false
.related to: #2462
The text was updated successfully, but these errors were encountered: