Skip to content

Make ip fields backward-compatible at query time.#18593

Merged
jpountz merged 1 commit intoelastic:masterfrom
jpountz:fix/ip_back_compat
May 31, 2016
Merged

Make ip fields backward-compatible at query time.#18593
jpountz merged 1 commit intoelastic:masterfrom
jpountz:fix/ip_back_compat

Conversation

@jpountz
Copy link
Copy Markdown
Contributor

@jpountz jpountz commented May 26, 2016

The fact that ip fields used a different doc values representation in 2.x causes
issues when querying 2.x and 5.0 indices in the same request. This changes 2.x
doc values on ip fields/2.x to be hidden behind binary doc values that use the
same encoding as 5.0. This way the coordinating node will be able to merge shard
responses that have different major versions.

One known issue is that this makes sorting/aggregating slower on ip fields for
indices that have been generated with elasticsearch 2.x.

Relates to #17971

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

By this comment do we mean "there is nothing to do here" or "this should never be called"? If it's the latter should we throw an UnsupportedOperationException instead? If it's the former could we instead change the comment to // nothing to do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is the former. I will fix the comment.

@colings86
Copy link
Copy Markdown
Contributor

@jpountz I left a couple of comments

@jpountz
Copy link
Copy Markdown
Contributor Author

jpountz commented May 31, 2016

@colings86 I fixed the comments.

@colings86
Copy link
Copy Markdown
Contributor

@jpountz thanks, LGTM

The fact that ip fields used a different doc values representation in 2.x causes
issues when querying 2.x and 5.0 indices in the same request. This changes 2.x
doc values on ip fields/2.x to be hidden behind binary doc values that use the
same encoding as 5.0. This way the coordinating node will be able to merge shard
responses that have different major versions.

One known issue is that this makes sorting/aggregating slower on ip fields for
indices that have been generated with elasticsearch 2.x.
@jpountz jpountz force-pushed the fix/ip_back_compat branch from 39adb9c to adf4712 Compare May 31, 2016 12:50
@jpountz jpountz merged commit adf4712 into elastic:master May 31, 2016
@jpountz jpountz deleted the fix/ip_back_compat branch May 31, 2016 13:14
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