Skip to content

Commit 6fa5f51

Browse files
authored
Enable HNSW early termination by default in snapshot builds (elastic#139468)
This will allow us to measure activity across all our various benchmarks and tests to make sure its all good before moving to switching the default for this value to `true`.
1 parent 6055db3 commit 6fa5f51

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ public class DenseVectorFieldMapper extends FieldMapper {
134134
public static final String COSINE_MAGNITUDE_FIELD_SUFFIX = "._magnitude";
135135
public static final int BBQ_MIN_DIMS = 64;
136136

137-
private static final boolean DEFAULT_HNSW_EARLY_TERMINATION = false;
138-
139137
/**
140138
* The heuristic to utilize when executing a filtered search against vectors indexed in an HNSW graph.
141139
*/
@@ -183,7 +181,7 @@ public KnnSearchStrategy getKnnSearchStrategy() {
183181

184182
public static final Setting<Boolean> HNSW_EARLY_TERMINATION = Setting.boolSetting(
185183
"index.dense_vector.hnsw_enable_early_termination",
186-
DEFAULT_HNSW_EARLY_TERMINATION,
184+
Build.current().isSnapshot(),
187185
Setting.Property.IndexScope,
188186
Setting.Property.ServerlessPublic,
189187
Setting.Property.Dynamic

0 commit comments

Comments
 (0)