Package com.redis.vl.query
Class Vector
java.lang.Object
com.redis.vl.query.Vector
Simple object containing the necessary arguments to perform a multi-vector query.
Ported from Python: redisvl/query/aggregate.py:16-36 (Vector class)
Python equivalent:
from redisvl.query import Vector
vector = Vector(
vector=[0.1, 0.2, 0.3],
field_name="text_embedding",
dtype="float32",
weight=0.7
)
Java equivalent:
Vector vector = Vector.builder()
.vector(new float[]{0.1f, 0.2f, 0.3f})
.fieldName("text_embedding")
.dtype("float32")
.weight(0.7)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating Vector instances. -
Method Summary
-
Method Details
-
builder
Create a new Builder for Vector.- Returns:
- A new Builder instance
-
getVector
public float[] getVector()Get a copy of the vector.- Returns:
- Copy of the vector
-
equals
-
hashCode
public int hashCode() -
toString
-