LuXugang commented on code in PR #859:
URL: https://github.com/apache/lucene/pull/859#discussion_r863001028


##########
lucene/core/src/java/org/apache/lucene/search/KnnVectorQuery.java:
##########
@@ -288,15 +288,20 @@ public void visit(QueryVisitor visitor) {
 
   @Override
   public boolean equals(Object obj) {
-    return sameClassAs(obj)
-        && ((KnnVectorQuery) obj).k == k
-        && ((KnnVectorQuery) obj).field.equals(field)
-        && Arrays.equals(((KnnVectorQuery) obj).target, target);
+    if (sameClassAs(obj) == false) {
+      return false;
+    }
+    return ((KnnVectorQuery) obj).k == k
+            && ((KnnVectorQuery) obj).field.equals(field)
+            && Arrays.equals(((KnnVectorQuery) obj).target, target)
+            && ((KnnVectorQuery) obj).filter == null
+        ? filter == null

Review Comment:
   Thanks @msokolov , addressd in 
https://github.com/apache/lucene/pull/859/commits/abe27989ef2fc650191bdbd916ee0a48dd8e2d41
 .



-- 
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