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

DFS modes can cause undefined behaviour in 0.90 #3012

Closed
s1monw opened this Issue May 8, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@s1monw
Copy link
Contributor

s1monw commented May 8, 2013

Currently some of the transport protocols are broken if Term/FieldStatistics don't provide all optional information. For instance we use totalTermFrequency in the TermStats but if you omit the term frequency the totalTermFrequency is a negative 1 (-1). This also happens if an index gets upgrade to 0.90 from a 0.20 version that runs lucene 3.6 and doesn't have these stats so they are -1 by default. This seems to be the cause for #3008 as well as #2932 which eventually fail with NPE since the reading behavior of vlongs is undefined.

@ghost ghost assigned s1monw May 8, 2013

s1monw added a commit to s1monw/elasticsearch that referenced this issue May 8, 2013

Handle optional term and field statistics gracefully
Lucene provides a set of statistics that depend on the codec / postingsformat
as well as on the index options used when the field is created / indexed.
If a certain stats value is not available lucene return `-1` instead of the
correct value. We need to ensure that those values are encoded correctly if
we try to write vLongs as well as when we aggregate those values.

Closes elastic#3012

@s1monw s1monw closed this in 1ef8761 May 8, 2013

s1monw added a commit that referenced this issue May 8, 2013

Handle optional term and field statistics gracefully
Lucene provides a set of statistics that depend on the codec / postingsformat
as well as on the index options used when the field is created / indexed.
If a certain stats value is not available lucene return `-1` instead of the
correct value. We need to ensure that those values are encoded correctly if
we try to write vLongs as well as when we aggregate those values.

Closes #3012

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Handle optional term and field statistics gracefully
Lucene provides a set of statistics that depend on the codec / postingsformat
as well as on the index options used when the field is created / indexed.
If a certain stats value is not available lucene return `-1` instead of the
correct value. We need to ensure that those values are encoded correctly if
we try to write vLongs as well as when we aggregate those values.

Closes elastic#3012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.