You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2017/07/17 20:40:40 UTC

lucene-solr:master: LUCENE-7737: Guard against empty binary docvalues

Repository: lucene-solr
Updated Branches:
  refs/heads/master 3bd111596 -> 6fcc7cd73


LUCENE-7737: Guard against empty binary docvalues


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6fcc7cd7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6fcc7cd7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6fcc7cd7

Branch: refs/heads/master
Commit: 6fcc7cd731715a14c6bb36c22a23eaa040271d72
Parents: 3bd1115
Author: Alan Woodward <ro...@apache.org>
Authored: Mon Jul 17 21:38:55 2017 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Mon Jul 17 21:40:22 2017 +0100

----------------------------------------------------------------------
 .../apache/lucene/spatial/serialized/SerializedDVStrategy.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6fcc7cd7/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
index 3a33380..c036d34 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
@@ -26,6 +26,7 @@ import java.io.IOException;
 import org.apache.lucene.document.BinaryDocValuesField;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.BinaryDocValues;
+import org.apache.lucene.index.DocValues;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.search.ConstantScoreScorer;
 import org.apache.lucene.search.ConstantScoreWeight;
@@ -163,7 +164,7 @@ public class SerializedDVStrategy extends SpatialStrategy {
   }//PredicateValueSourceQuery
 
   /**
-   * Implements a ValueSource by deserializing a Shape in from BinaryDocValues using BinaryCodec.
+   * Implements a ShapeValueSource by deserializing a Shape from BinaryDocValues using BinaryCodec.
    * @see #makeShapeValueSource()
    */
   static class ShapeDocValueSource extends ShapeValuesSource {
@@ -178,7 +179,7 @@ public class SerializedDVStrategy extends SpatialStrategy {
 
     @Override
     public ShapeValues getValues(LeafReaderContext readerContext) throws IOException {
-      final BinaryDocValues docValues = readerContext.reader().getBinaryDocValues(fieldName);
+      final BinaryDocValues docValues = DocValues.getBinary(readerContext.reader(), fieldName);
 
       return new ShapeValues() {
         @Override