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

ScriptDocValues.EMPTY doesn't implement `getValue` #5646

Closed
jpountz opened this Issue Apr 1, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@jpountz
Copy link
Contributor

commented Apr 1, 2014

This might not look like an issue since getting a single value on something that is empty makes no sense but it introduces an inconsistency between documents that have no value, depending on whether they are on a segment that has no value at all (which will use ScriptDocValues.EMPTY), or on a segment where at list one document has a value. In the latter case, ScriptDocValues.Longs (or Doubles) will be used and these classes implement getValue and return a default value (0) for documents with no value.

See #4684 (comment) for the original bug report.

@jpountz jpountz self-assigned this Apr 1, 2014

jpountz added a commit to jpountz/elasticsearch that referenced this issue Apr 1, 2014

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close elastic#5646

@jpountz jpountz added v2.0.0 labels Apr 1, 2014

@s1monw

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2014

+1 to just remove the empty one!

jpountz added a commit that referenced this issue Apr 2, 2014

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close #5646

jpountz added a commit that referenced this issue Apr 2, 2014

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close #5646

jpountz added a commit that referenced this issue Apr 2, 2014

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close #5646

@jpountz jpountz closed this in 4ff3e19 Apr 2, 2014

@jpountz jpountz added the v1.0.3 label Apr 2, 2014

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

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close elastic#5646

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

Remove ScriptDocValues.EMPTY.
Instead the default implementation is used, but on top of empty
(Bytes|Long|Double|GeoPoint)Values. This makes sure there is no
inconsistency between documents depending on whether other documents in the
segment have values or not.

Close elastic#5646
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.