You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2022/11/10 23:40:30 UTC

[lucene] branch main updated: Follow up to GITHUB#11916, remove deleted docs check (#11919)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new c8d44acf20e Follow up to GITHUB#11916, remove deleted docs check (#11919)
c8d44acf20e is described below

commit c8d44acf20effea19651de007081a0e5140e4c5a
Author: Benjamin Trent <be...@gmail.com>
AuthorDate: Thu Nov 10 18:40:24 2022 -0500

    Follow up to GITHUB#11916, remove deleted docs check (#11919)
---
 .../core/src/java/org/apache/lucene/index/CheckIndex.java  | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
index 29c0b4aaea5..0e8d7e2e22d 100644
--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
@@ -2589,7 +2589,6 @@ public final class CheckIndex implements Closeable {
             status.totalKnnVectorFields++;
 
             int docCount = 0;
-            final Bits bits = reader.getLiveDocs();
             int everyNdoc = Math.max(values.size() / 64, 1);
             while (values.nextDoc() != NO_MORE_DOCS) {
               float[] vectorValue = values.vectorValue();
@@ -2598,22 +2597,11 @@ public final class CheckIndex implements Closeable {
                 TopDocs docs =
                     reader
                         .getVectorReader()
-                        .search(fieldInfo.name, vectorValue, 10, bits, Integer.MAX_VALUE);
+                        .search(fieldInfo.name, vectorValue, 10, null, Integer.MAX_VALUE);
                 if (docs.scoreDocs.length == 0) {
                   throw new CheckIndexException(
                       "Field \"" + fieldInfo.name + "\" failed to search k nearest neighbors");
                 }
-                if (bits != null) {
-                  for (ScoreDoc doc : docs.scoreDocs) {
-                    if (bits.get(doc.doc) == false) {
-                      throw new CheckIndexException(
-                          "Searching Field \""
-                              + fieldInfo.name
-                              + "\" matched deleted doc="
-                              + doc.doc);
-                    }
-                  }
-                }
               }
               int valueLength = vectorValue.length;
               if (valueLength != dimension) {