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

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

Merged
merged 1 commit into from
May 31, 2016

Conversation

jpountz
Copy link
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

}

public final void clear() {
// can't do
Copy link
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
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
Contributor

@jpountz I left a couple of comments

@jpountz
Copy link
Contributor Author

jpountz commented May 31, 2016

@colings86 I fixed the comments.

@colings86
Copy link
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 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