K - Key typepublic class VectorFieldArgs<K> extends FieldArgs<K>
Vector fields are floating-point vectors that are typically generated by external machine learning models. These vectors represent unstructured data such as text, images, or other complex features. Redis allows you to search for similar vectors using vector search algorithms like cosine similarity, Euclidean distance, and inner product.
| Modifier and Type | Class and Description |
|---|---|
static class |
VectorFieldArgs.Algorithm
Vector similarity index algorithms.
|
static class |
VectorFieldArgs.Builder<K>
Builder for
VectorFieldArgs. |
static class |
VectorFieldArgs.DistanceMetric
Distance metrics for vector similarity.
|
static class |
VectorFieldArgs.VectorType
Vector data types.
|
as, indexEmpty, indexMissing, name, noIndex, sortable, unNormalizedForm| Constructor and Description |
|---|
VectorFieldArgs() |
| Modifier and Type | Method and Description |
|---|---|
static <K> VectorFieldArgs.Builder<K> |
builder()
Create a new
VectorFieldArgs using the builder pattern. |
protected void |
buildTypeSpecificArgs(CommandArgs<K,?> args)
Add type-specific arguments to the command.
|
Optional<VectorFieldArgs.Algorithm> |
getAlgorithm()
Get the vector algorithm.
|
Map<String,Object> |
getAttributes()
Get the vector attributes.
|
String |
getFieldType()
Returns the field type.
|
build, getAs, getName, isIndexEmpty, isIndexMissing, isNoIndex, isSortable, isUnNormalizedFormpublic static <K> VectorFieldArgs.Builder<K> builder()
VectorFieldArgs using the builder pattern.K - Key typeVectorFieldArgs.Builderpublic String getFieldType()
FieldArgsgetFieldType in class FieldArgs<K>public Optional<VectorFieldArgs.Algorithm> getAlgorithm()
public Map<String,Object> getAttributes()
protected void buildTypeSpecificArgs(CommandArgs<K,?> args)
FieldArgsbuildTypeSpecificArgs in class FieldArgs<K>args - the command arguments to modifyCopyright © 2025 lettuce.io. All rights reserved.