jpountz commented on a change in pull request #262:
URL: https://github.com/apache/lucene/pull/262#discussion_r696747416



##########
File path: 
lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextKnnVectorsReader.java
##########
@@ -140,7 +145,36 @@ public VectorValues getVectorValues(String field) throws 
IOException {
 
   @Override
   public TopDocs search(String field, float[] target, int k, Bits acceptDocs) 
throws IOException {
-    throw new UnsupportedOperationException();
+    VectorValues values = getVectorValues(field);
+    if (values == null) {
+      return null;
+    }

Review comment:
       Let's remove this null check? It shouldn't be necessary since 
`getVectorValues()` is expected to return a non-null value when the number of 
dimentions is greater than 0 on the `FieldInfo`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to