LUCENE-10109: Bump default beam width for HNSW (#312)

Lucene90HnswVectorsFormat has a default 'beam width' of 16. This is quite low
and produces poor recall on typical-sized datasets.

This commit bumps it to 100. This new default tries to balance good search
performance with indexing speed. Most runs in ann-benchmarks set the parameter
between ~400 and 800, but they are heavily optimizing search over index speed.
This commit is contained in:
Julie Tibshirani 2021-09-24 18:02:34 -07:00 committed by GitHub
parent eb44d1e6ad
commit eaa421094d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ public final class Lucene90HnswVectorsFormat extends KnnVectorsFormat {
static final int VERSION_CURRENT = VERSION_START;
public static final int DEFAULT_MAX_CONN = 16;
public static final int DEFAULT_BEAM_WIDTH = 16;
public static final int DEFAULT_BEAM_WIDTH = 100;
/**
* Controls how many of the nearest neighbor candidates are connected to the new node. Defaults to