Skip to content

Commit 4033256

Browse files
committed
fixed testMeta
1 parent d647aae commit 4033256

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/reference/elasticsearch/mapping-reference/dense-vector.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ $$$dense-vector-index-options$$$
281281
: In case a knn query specifies a `rescore_vector` parameter, the query `rescore_vector` parameter will be used instead.
282282
: See [oversampling and rescoring quantized vectors](docs-content://solutions/search/vector/knn.md#dense-vector-knn-search-rescoring) for details.
283283
:::::
284+
285+
`early_termination`
286+
: (Optional, boolean) Apply _patience_ based early termination strategy to knn queries over HNSW graphs (see [paper](https://cs.uwaterloo.ca/~jimmylin/publications/Teofili_Lin_ECIR2025.pdf)). This is expected to produce Only applicable to `hnsw`, `int8_hnsw`, `int4_hnsw` and `bbq_hnsw` index types.
284287
::::
285288

286289

server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,18 @@ private void indexMapping(XContentBuilder b, IndexVersion indexVersion) throws I
125125
b.startObject("rescore_vector");
126126
b.field("oversample", DEFAULT_OVERSAMPLE);
127127
b.endObject();
128+
if (indexVersion.onOrAfter(DenseVectorFieldMapper.EXPOSE_EARLY_TERMINATION)) {
129+
b.field("early_termination", false);
130+
}
128131
b.endObject();
129132
} else {
130133
b.startObject("index_options");
131134
b.field("type", "int8_hnsw");
132135
b.field("m", 16);
133136
b.field("ef_construction", 100);
137+
if (indexVersion.onOrAfter(DenseVectorFieldMapper.EXPOSE_EARLY_TERMINATION)) {
138+
b.field("early_termination", false);
139+
}
134140
b.endObject();
135141
}
136142
}

0 commit comments

Comments
 (0)