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

Propagate DocValueFormat to all terms aggs. #17646

Merged

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Apr 11, 2016

TL;DR This commit should not have any impact on terms aggs, it will just make
supporting ipv6 easier.

Currently only the numeric terms aggs propagate the DocValueFormat instance since
we use numerics to represent also dates or ip addresses. Since string terms aggs
are only used for text/keyword/string fields, they do not use the format and just
call toUt8String(). However when we support ipv6, ip addresses as well will be
encoded in sorted doc values (just like strings) so we will need to use the
DocValueFormat to format the keys.

@dakrone
Copy link
Member

dakrone commented Apr 11, 2016

LGTM

TL;DR This commit should not have any impact on terms aggs, it will just make
supporting ipv6 easier.

Currently only the numeric terms aggs propagate the DocValueFormat instance since
we use numerics to represent also dates or ip addresses. Since string terms aggs
are only used for text/keyword/string fields, they do not use the format and just
call toUt8String(). However when we support ipv6, ip addresses as well will be
encoded in sorted doc values (just like strings) so we will need to use the
DocValueFormat to format the keys.
@jpountz jpountz force-pushed the enhancement/propagate_doc_value_format branch from 7df4143 to 13c1efd Compare April 11, 2016 14:33
@jpountz jpountz merged commit 13c1efd into elastic:master Apr 11, 2016
@jpountz jpountz deleted the enhancement/propagate_doc_value_format branch April 11, 2016 14:34
@jpountz jpountz removed the review label Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants