cpoerschke commented on code in PR #14084: URL: https://github.com/apache/lucene/pull/14084#discussion_r1901999056
########## lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphSearcher.java: ########## @@ -67,7 +70,21 @@ public static void search( HnswGraphSearcher graphSearcher = new HnswGraphSearcher( new NeighborQueue(knnCollector.k(), true), new SparseFixedBitSet(getGraphSize(graph))); - search(scorer, knnCollector, graph, graphSearcher, acceptOrds); + final int[] entryPoints; + if (knnCollector instanceof EntryPointProvider epp) { + DocIdSetIterator eps = epp.entryPoints(); + entryPoints = new int[(int) eps.cost()]; Review Comment: yes, looks like based on the `SeededKnnCollectorManager` implementation. could that be formalised perhaps via the `EntryPointProvider` interface i.e. it returns the point count too and then no need to assume a particular cost implementation here? -- 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