lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject [lucene-solr] branch master updated: LUCENE-8103: Revert QueryValueSource.objectVal change
Date Mon, 16 Mar 2020 04:27:25 GMT
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 261e7ba  LUCENE-8103: Revert QueryValueSource.objectVal change
261e7ba is described below

commit 261e7ba86cb1d9c97b7f80e7f2c6b9d1ed59b988
Author: David Smiley <dsmiley@apache.org>
AuthorDate: Mon Mar 16 00:27:04 2020 -0400

    LUCENE-8103: Revert QueryValueSource.objectVal change
---
 .../lucene/queries/function/valuesource/QueryValueSource.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
index 03e4b9c..55cf2cb 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
@@ -164,10 +164,14 @@ class QueryDocValues extends FloatDocValues {
     }
   }
 
-   @Override
+  @Override
   public Object objectVal(int doc) {
-     return floatVal(doc);
-   }
+    try {
+      return exists(doc) ? scorer.score() : null;
+    } catch (IOException e) {
+      throw new RuntimeException("caught exception in QueryDocVals(" + q + ") doc=" + doc,
e);
+    }
+  }
 
   @Override
   public ValueFiller getValueFiller() {


Mime
View raw message