Class DenseVectorProperty
java.lang.Object
co.elastic.clients.elasticsearch._types.mapping.PropertyBase
co.elastic.clients.elasticsearch._types.mapping.DenseVectorProperty
- All Implemented Interfaces:
PropertyVariant,JsonpSerializable
@JsonpDeserializable
public class DenseVectorProperty
extends PropertyBase
implements PropertyVariant
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.mapping.PropertyBase
PropertyBase.AbstractBuilder<BuilderT extends PropertyBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<DenseVectorProperty>Json deserializer forDenseVectorProperty -
Method Summary
Modifier and TypeMethodDescriptionProperty variant kind.final Integerdims()Number of vector dimensions.final DenseVectorElementTypeThe data type used to encode vectors.final Booleanindex()Iftrue, you can search this field using the kNN search API.final DenseVectorIndexOptionsAn optional section that configures the kNN indexing algorithm.static DenseVectorPropertyprotected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal DenseVectorSimilarityThe vector similarity metric to use in kNN search.Methods inherited from class co.elastic.clients.elasticsearch._types.mapping.PropertyBase
dynamic, fields, ignoreAbove, meta, properties, serialize, setupPropertyBaseDeserializer, syntheticSourceKeep, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.json.JsonpSerializable
serializeMethods inherited from interface co.elastic.clients.elasticsearch._types.mapping.PropertyVariant
_toProperty
-
Field Details
-
_DESERIALIZER
Json deserializer forDenseVectorProperty
-
-
Method Details
-
of
public static DenseVectorProperty of(Function<DenseVectorProperty.Builder, ObjectBuilder<DenseVectorProperty>> fn) -
_propertyKind
Property variant kind.- Specified by:
_propertyKindin interfacePropertyVariant
-
dims
Number of vector dimensions. Can't exceed4096. Ifdimsis not specified, it will be set to the length of the first vector added to the field.API name:
dims -
elementType
The data type used to encode vectors. The supported data types arefloat(default),byte, andbit.API name:
element_type -
index
Iftrue, you can search this field using the kNN search API.API name:
index -
indexOptions
An optional section that configures the kNN indexing algorithm. The HNSW algorithm has two internal parameters that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the expense of slower indexing speed.This parameter can only be specified when
indexistrue.API name:
index_options -
similarity
The vector similarity metric to use in kNN search.Documents are ranked by their vector field's similarity to the query vector. The
_scoreof each document will be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds to a higher ranking.Defaults to
l2_normwhenelement_typeisbitotherwise defaults tocosine.bitvectors only supportl2_normas their similarity metric.This parameter can only be specified when
indexistrue.API name:
similarity -
serializeInternal
- Overrides:
serializeInternalin classPropertyBase
-
setupDenseVectorPropertyDeserializer
protected static void setupDenseVectorPropertyDeserializer(ObjectDeserializer<DenseVectorProperty.Builder> op)
-