Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10351

Correct knn search failure with all deleted docs

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 9.1
    • None
    • New

    Description

      Current when doing knn search on an segment where all documents with knn field were deleted, we get the following error:

      maxSize must be > 0 and < 2147483630; got: 0
      java.lang.IllegalArgumentException: maxSize must be > 0 and < 2147483630; got: 0
      at __randomizedtesting.SeedInfo.seed([43F1F124D7076A4E:1B860BFCCB9B0BB5]:0)
      at org.apache.lucene.util.LongHeap.<init>(LongHeap.java:57)
      at org.apache.lucene.util.LongHeap$1.<init>(LongHeap.java:69)
      at org.apache.lucene.util.LongHeap.create(LongHeap.java:69)
      at org.apache.lucene.util.hnsw.NeighborQueue.<init>(NeighborQueue.java:41)
      at org.apache.lucene.util.hnsw.HnswGraph.search(HnswGraph.java:105)#

      A desired behaviour: instead of an error, an empty TopDocs should be returned.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mayya Mayya Sharipova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h