jainankitk commented on code in PR #15334:
URL: https://github.com/apache/lucene/pull/15334#discussion_r2427105937


##########
lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java:
##########
@@ -255,7 +262,7 @@ public KnnCollector newCollector(
         int visitedLimit, KnnSearchStrategy searchStrategy, LeafReaderContext 
context)
         throws IOException {
       // The delegate supports optimistic collection
-      if (delegate.isOptimistic()) {
+      if (delegate.isOptimistic() && context.parent != null) {

Review Comment:
   I am assuming the same reasoning applies here as well? `// ctx.parent could 
be null if this is a MemoryIndex`. If yes, can be add the comment here as well?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to