[ https://issues.apache.org/jira/browse/LUCENE-10351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468847#comment-17468847 ]
ASF subversion and git services commented on LUCENE-10351: ---------------------------------------------------------- Commit 78da7030370102d024afc9945965ba3ae7195823 in lucene's branch refs/heads/main from Mayya Sharipova [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=78da703 ] LUCENE-10351 Correct knn search failure with deleted docs (#580) 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)# This patch fixes this error and ensures empty TopDocs are returned when knn field doesn't have any documents left. > Correct knn search failure with all deleted docs > ------------------------------------------------- > > Key: LUCENE-10351 > URL: https://issues.apache.org/jira/browse/LUCENE-10351 > Project: Lucene - Core > Issue Type: Bug > Reporter: Mayya Sharipova > Priority: Trivial > Time Spent: 1h 20m > Remaining Estimate: 0h > > 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. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org