public interface VectorSetCommands
| Modifier and Type | Method and Description |
|---|---|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element)
VADD Command Add a new element
into the vector set specified by key.
|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with dimension reduction and additional parameters.
|
boolean |
vadd(java.lang.String key,
float[] vector,
java.lang.String element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with additional parameters.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
int reduceDim,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with dimension reduction and
additional parameters.
|
boolean |
vaddFP32(java.lang.String key,
byte[] vectorBlob,
java.lang.String element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format with additional parameters.
|
long |
vcard(java.lang.String key)
VCARD Command Return the
number of elements in the specified vector set.
|
long |
vdim(java.lang.String key)
VDIM Command Return the number
of dimensions of the vectors in the specified vector set.
|
java.util.List<java.lang.Double> |
vemb(java.lang.String key,
java.lang.String element)
VEMB Command Return the
approximate vector associated with a given element in the vector set.
|
RawVector |
vembRaw(java.lang.String key,
java.lang.String element)
VEMB Command Return the raw
vector data associated with a given element in the vector set.
|
java.lang.String |
vgetattr(java.lang.String key,
java.lang.String element)
VGETATTR Command Get the
attributes of an element in a vector set.
|
VectorInfo |
vinfo(java.lang.String key)
VINFO Command Get information
about a vector set.
|
java.util.List<java.util.List<java.lang.String>> |
vlinks(java.lang.String key,
java.lang.String element)
VLINKS Command Return the
neighbors of a specified element in a vector set.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Double>> |
vlinksWithScores(java.lang.String key,
java.lang.String element)
VLINKS Command Return the
neighbors of a specified element in a vector set with similarity scores.
|
java.lang.String |
vrandmember(java.lang.String key)
VRANDMEMBER Command
Return a random element from a vector set.
|
java.util.List<java.lang.String> |
vrandmember(java.lang.String key,
int count)
VRANDMEMBER Command
Return random elements from a vector set.
|
boolean |
vrem(java.lang.String key,
java.lang.String element)
VREM Command Remove an element
from a vector set.
|
boolean |
vsetattr(java.lang.String key,
java.lang.String element,
java.lang.String attributes)
VSETATTR Command Set the
attributes of an element in a vector set.
|
java.util.List<java.lang.String> |
vsim(java.lang.String key,
float[] vector)
VSIM Command Return elements
similar to a given vector.
|
java.util.List<java.lang.String> |
vsim(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with additional parameters.
|
java.util.List<java.lang.String> |
vsimByElement(java.lang.String key,
java.lang.String element)
VSIM Command Return elements
similar to a given element in the vector set.
|
java.util.List<java.lang.String> |
vsimByElement(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with additional parameters.
|
java.util.Map<java.lang.String,java.lang.Double> |
vsimByElementWithScores(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores.
|
java.util.Map<java.lang.String,VSimScoreAttribs> |
vsimByElementWithScoresAndAttribs(java.lang.String key,
java.lang.String element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores and attributes.
|
java.util.Map<java.lang.String,java.lang.Double> |
vsimWithScores(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores.
|
java.util.Map<java.lang.String,VSimScoreAttribs> |
vsimWithScoresAndAttribs(java.lang.String key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores and attributes.
|
@Experimental boolean vadd(java.lang.String key, float[] vector, java.lang.String element)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector set@Experimental boolean vadd(java.lang.String key, float[] vector, java.lang.String element, VAddParams params)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setparams - additional parameters for the VADD command@Experimental boolean vaddFP32(java.lang.String key, byte[] vectorBlob, java.lang.String element)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector set@Experimental boolean vaddFP32(java.lang.String key, byte[] vectorBlob, java.lang.String element, VAddParams params)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setparams - additional parameters for the VADD command@Experimental boolean vadd(java.lang.String key, float[] vector, java.lang.String element, int reduceDim, VAddParams params)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavector - the vector as floating point numberselement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD command@Experimental boolean vaddFP32(java.lang.String key, byte[] vectorBlob, java.lang.String element, int reduceDim, VAddParams params)
Time complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
key - the name of the key that will hold the vector set datavectorBlob - the vector as FP32 binary blobelement - the name of the element that is being added to the vector setreduceDim - the target dimension after reduction using random projectionparams - additional parameters for the VADD command@Experimental java.util.List<java.lang.String> vsim(java.lang.String key, float[] vector)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set datavector - the vector to use as similarity reference@Experimental java.util.List<java.lang.String> vsim(java.lang.String key, float[] vector, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command@Experimental java.util.Map<java.lang.String,java.lang.Double> vsimWithScores(java.lang.String key, float[] vector, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)@Experimental java.util.Map<java.lang.String,VSimScoreAttribs> vsimWithScoresAndAttribs(java.lang.String key, float[] vector, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set datavector - the vector to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)@Experimental java.util.List<java.lang.String> vsimByElement(java.lang.String key, java.lang.String element)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set dataelement - the name of the element to use as similarity reference@Experimental java.util.List<java.lang.String> vsimByElement(java.lang.String key, java.lang.String element, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command@Experimental java.util.Map<java.lang.String,java.lang.Double> vsimByElementWithScores(java.lang.String key, java.lang.String element, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES will be automatically
added)@Experimental java.util.Map<java.lang.String,VSimScoreAttribs> vsimByElementWithScoresAndAttribs(java.lang.String key, java.lang.String element, VSimParams params)
Time complexity: O(log(N)) where N is the number of elements in the vector set.
key - the name of the key that holds the vector set dataelement - the name of the element to use as similarity referenceparams - additional parameters for the VSIM command (WITHSCORES and WITHATTRIBS will be
automatically added)@Experimental long vdim(java.lang.String key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental long vcard(java.lang.String key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental java.util.List<java.lang.Double> vemb(java.lang.String key, java.lang.String element)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrieve@Experimental RawVector vembRaw(java.lang.String key, java.lang.String element)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose vector you want to retrieve@Experimental boolean vrem(java.lang.String key, java.lang.String element)
Time complexity: O(log(N)) for each element removed, where N is the number of elements in the vector set
key - the name of the key that holds the vector setelement - the name of the element to remove from the vector set@Experimental java.util.List<java.util.List<java.lang.String>> vlinks(java.lang.String key, java.lang.String element)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspect@Experimental java.util.List<java.util.Map<java.lang.String,java.lang.Double>> vlinksWithScores(java.lang.String key, java.lang.String element)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose HNSW neighbors you want to inspect@Experimental java.lang.String vrandmember(java.lang.String key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental java.util.List<java.lang.String> vrandmember(java.lang.String key, int count)
Time complexity: O(N) where N is the absolute value of the count argument
key - the name of the key that holds the vector setcount - the number of elements to return. Positive values return distinct elements;
negative values allow duplicates@Experimental java.lang.String vgetattr(java.lang.String key, java.lang.String element)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose attributes to retrieve@Experimental boolean vsetattr(java.lang.String key, java.lang.String element, java.lang.String attributes)
Time complexity: O(1)
key - the name of the key that holds the vector setelement - the name of the element whose attributes to setattributes - the attributes to set as a JSON string@Experimental VectorInfo vinfo(java.lang.String key)
Time complexity: O(1)
key - the name of the key that holds the vector setCopyright © 2025. All rights reserved.