mirror of https://github.com/apache/lucene.git
Only attempt to connect components when entry point is valid (#13660)
* Only attempt to connect components when entry point is valid * iter
This commit is contained in:
parent
299d7f6721
commit
1c9bd6bdb4
|
@ -454,6 +454,9 @@ public class HnswGraphBuilder implements HnswBuilder {
|
||||||
int[] eps = new int[1];
|
int[] eps = new int[1];
|
||||||
for (Component c : components) {
|
for (Component c : components) {
|
||||||
if (c != c0) {
|
if (c != c0) {
|
||||||
|
if (c.start() == NO_MORE_DOCS) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
beam.clear();
|
beam.clear();
|
||||||
eps[0] = c0.start();
|
eps[0] = c0.start();
|
||||||
RandomVectorScorer scorer = scorerSupplier.scorer(c.start());
|
RandomVectorScorer scorer = scorerSupplier.scorer(c.start());
|
||||||
|
|
Loading…
Reference in New Issue