diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java
index 535a22d4e..3435ead81 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java
@@ -79,6 +79,9 @@ public class DenseVectorIndexOptions implements JsonpSerializable {
@Nullable
private final Boolean onDiskRescore;
+ @Nullable
+ private final Integer flatIndexThreshold;
+
// ---------------------------------------------------------------------------------------------
private DenseVectorIndexOptions(Builder builder) {
@@ -89,6 +92,7 @@ private DenseVectorIndexOptions(Builder builder) {
this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type");
this.rescoreVector = builder.rescoreVector;
this.onDiskRescore = builder.onDiskRescore;
+ this.flatIndexThreshold = builder.flatIndexThreshold;
}
@@ -183,6 +187,24 @@ public final Boolean onDiskRescore() {
return this.onDiskRescore;
}
+ /**
+ * The segment document count threshold below which HNSW graph construction is
+ * skipped in favor of brute-force flat search. -1 (default) defers
+ * to format defaults: 300 for bbq_hnsw,
+ * 150 for hnsw, int8_hnsw, and
+ * int4_hnsw. 0 always builds the graph. A positive
+ * value overrides the format default.
+ *
+ * Only applicable to hnsw, int8_hnsw,
+ * int4_hnsw, and bbq_hnsw index types.
+ *
+ * API name: {@code flat_index_threshold}
+ */
+ @Nullable
+ public final Integer flatIndexThreshold() {
+ return this.flatIndexThreshold;
+ }
+
/**
* Serialize this object to JSON.
*/
@@ -221,6 +243,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.onDiskRescore);
}
+ if (this.flatIndexThreshold != null) {
+ generator.writeKey("flat_index_threshold");
+ generator.write(this.flatIndexThreshold);
+
+ }
}
@@ -255,6 +282,9 @@ public static class Builder extends WithJsonObjectBuilderBase
+ * Only applicable to
+ * API name: {@code flat_index_threshold}
+ */
+ public final Builder flatIndexThreshold(@Nullable Integer value) {
+ this.flatIndexThreshold = value;
+ return this;
+ }
+
@Override
protected Builder self() {
return this;
@@ -408,6 +457,7 @@ protected static void setupDenseVectorIndexOptionsDeserializer(
op.add(Builder::type, DenseVectorIndexOptionsType._DESERIALIZER, "type");
op.add(Builder::rescoreVector, DenseVectorIndexOptionsRescoreVector._DESERIALIZER, "rescore_vector");
op.add(Builder::onDiskRescore, JsonpDeserializer.booleanDeserializer(), "on_disk_rescore");
+ op.add(Builder::flatIndexThreshold, JsonpDeserializer.integerDeserializer(), "flat_index_threshold");
}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html
index 5a4ee5d01..43a1441f4 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html
@@ -883,9 +883,9 @@
'_types.mapping.DateProperty': '_types/mapping/core.ts#L78-L90',
'_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32',
'_types.mapping.DenseVectorElementType': '_types/mapping/DenseVectorProperty.ts#L64-L85',
-'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorProperty.ts#L134-L179',
-'_types.mapping.DenseVectorIndexOptionsRescoreVector': '_types/mapping/DenseVectorProperty.ts#L237-L245',
-'_types.mapping.DenseVectorIndexOptionsType': '_types/mapping/DenseVectorProperty.ts#L181-L235',
+'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorProperty.ts#L134-L189',
+'_types.mapping.DenseVectorIndexOptionsRescoreVector': '_types/mapping/DenseVectorProperty.ts#L247-L255',
+'_types.mapping.DenseVectorIndexOptionsType': '_types/mapping/DenseVectorProperty.ts#L191-L245',
'_types.mapping.DenseVectorProperty': '_types/mapping/DenseVectorProperty.ts#L23-L62',
'_types.mapping.DenseVectorSimilarity': '_types/mapping/DenseVectorProperty.ts#L87-L132',
'_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L53-L55',
@@ -3562,10 +3562,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
- window.location = "https://github.com/elastic/elasticsearch-specification/tree/a11ffef0fa62bc289d624a0dde052163740ee4bf/specification/" + (paths[hash] || "");
+ window.location = "https://github.com/elastic/elasticsearch-specification/tree/ea5cd764eeab3a374bc18999c0ea39e554e62d2d/specification/" + (paths[hash] || "");
-1 (default) defers
+ * to format defaults: 300 for bbq_hnsw,
+ * 150 for hnsw, int8_hnsw, and
+ * int4_hnsw. 0 always builds the graph. A positive
+ * value overrides the format default.
+ * hnsw, int8_hnsw,
+ * int4_hnsw, and bbq_hnsw index types.
+ *