lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject lucene-solr:branch_7x: LUCENE-7737: Guard against empty binary docvalues
Date Mon, 24 Jul 2017 02:56:14 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x a9480cd90 -> 2642f2893


LUCENE-7737: Guard against empty binary docvalues

(cherry picked from commit 6fcc7cd)


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

Branch: refs/heads/branch_7x
Commit: 2642f28936b91b8f244e26563c85b708b9db24b9
Parents: a9480cd
Author: Alan Woodward <romseygeek@apache.org>
Authored: Mon Jul 17 16:38:55 2017 -0400
Committer: David Smiley <dsmiley@apache.org>
Committed: Sun Jul 23 22:55:59 2017 -0400

----------------------------------------------------------------------
 .../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/2642f289/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


Mime
View raw message