KnnFloatVectorField
Creates a numeric vector field. Fields are single-valued: each document has either one value or no value. Vectors of a single field share the same dimension and similarity function. Note that some vector similarities (like VectorSimilarityFunction.DOT_PRODUCT) require values to be unit-length, which can be enforced using VectorUtil.l2normalize.
Parameters
field name
value
a function defining vector proximity.
Throws
if any parameter is null, or the vector is empty or has dimension > 1024.
Creates a numeric vector field with the default EUCLIDEAN_HNSW (L2) similarity. Fields are single-valued: each document has either one value or no value. Vectors of a single field share the same dimension and similarity function.
Parameters
field name
value
Throws
if any parameter is null, or the vector is empty or has dimension > 1024.
Creates a numeric vector field. Fields are single-valued: each document has either one value or no value. Vectors of a single field share the same dimension and similarity function.
Parameters
field name
value
field type
Throws
if any parameter is null, or the vector is empty or has dimension > 1024.