public interface VectorSetBinaryCommands
| Modifier and Type | Method and Description |
|---|---|
boolean |
vadd(byte[] key,
float[] vector,
byte[] element)
VADD Command Add a new element
into the vector set specified by key.
|
boolean |
vadd(byte[] key,
float[] vector,
byte[] 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(byte[] key,
float[] vector,
byte[] element,
VAddParams params)
VADD Command Add a new element
into the vector set specified by key with additional parameters.
|
boolean |
vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] element)
VADD Command Add a new element
into the vector set specified by key using FP32 binary format.
|
boolean |
vaddFP32(byte[] key,
byte[] vectorBlob,
byte[] 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(byte[] key,
byte[] vectorBlob,
byte[] 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(byte[] key)
VCARD Command Return the
number of elements in the specified vector set.
|
long |
vdim(byte[] key)
VDIM Command Return the number
of dimensions of the vectors in the specified vector set.
|
java.util.List<java.lang.Double> |
vemb(byte[] key,
byte[] element)
VEMB Command Return the
approximate vector associated with a given element in the vector set.
|
RawVector |
vembRaw(byte[] key,
byte[] element)
VEMB Command Return the raw
vector data associated with a given element in the vector set.
|
byte[] |
vgetattr(byte[] key,
byte[] element)
VGETATTR Command Get the
attributes of an element in a vector set.
|
java.util.List<java.util.List<byte[]>> |
vlinks(byte[] key,
byte[] element)
VLINKS Command Return the
neighbors of a specified element in a vector set.
|
java.util.List<java.util.Map<byte[],java.lang.Double>> |
vlinksWithScores(byte[] key,
byte[] element)
VLINKS Command Return the
neighbors of a specified element in a vector set with similarity scores.
|
byte[] |
vrandmember(byte[] key)
VRANDMEMBER Command
Return a random element from a vector set.
|
java.util.List<byte[]> |
vrandmember(byte[] key,
int count)
VRANDMEMBER Command
Return random elements from a vector set.
|
boolean |
vrem(byte[] key,
byte[] element)
VREM Command Remove an element
from a vector set.
|
boolean |
vsetattr(byte[] key,
byte[] element,
byte[] attributes)
VSETATTR Command Set the
attributes of an element in a vector set.
|
java.util.List<byte[]> |
vsim(byte[] key,
float[] vector)
VSIM Command Return elements
similar to a given vector.
|
java.util.List<byte[]> |
vsim(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with additional parameters.
|
java.util.List<byte[]> |
vsimByElement(byte[] key,
byte[] element)
VSIM Command Return elements
similar to a given element in the vector set.
|
java.util.List<byte[]> |
vsimByElement(byte[] key,
byte[] element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with additional parameters.
|
java.util.Map<byte[],java.lang.Double> |
vsimByElementWithScores(byte[] key,
byte[] element,
VSimParams params)
VSIM Command Return elements
similar to a given element in the vector set with their similarity scores.
|
java.util.Map<byte[],VSimScoreAttribs> |
vsimByElementWithScoresAndAttribs(byte[] key,
byte[] 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<byte[],java.lang.Double> |
vsimWithScores(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores.
|
java.util.Map<byte[],VSimScoreAttribs> |
vsimWithScoresAndAttribs(byte[] key,
float[] vector,
VSimParams params)
VSIM Command Return elements
similar to a given vector with their similarity scores and attributes.
|
@Experimental boolean vadd(byte[] key, float[] vector, byte[] 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(byte[] key, float[] vector, byte[] 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(byte[] key, byte[] vectorBlob, byte[] 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(byte[] key, byte[] vectorBlob, byte[] 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(byte[] key, float[] vector, byte[] 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(byte[] key, byte[] vectorBlob, byte[] 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<byte[]> vsim(byte[] 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<byte[]> vsim(byte[] 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<byte[],java.lang.Double> vsimWithScores(byte[] 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<byte[],VSimScoreAttribs> vsimWithScoresAndAttribs(byte[] 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<byte[]> vsimByElement(byte[] key, byte[] 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<byte[]> vsimByElement(byte[] key, byte[] 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<byte[],java.lang.Double> vsimByElementWithScores(byte[] key, byte[] 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<byte[],VSimScoreAttribs> vsimByElementWithScoresAndAttribs(byte[] key, byte[] 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(byte[] key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental long vcard(byte[] key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental java.util.List<java.lang.Double> vemb(byte[] key, byte[] 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 retrieveRawVector vembRaw(byte[] key, byte[] 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(byte[] key, byte[] 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<byte[]>> vlinks(byte[] key, byte[] 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<byte[],java.lang.Double>> vlinksWithScores(byte[] key, byte[] 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 byte[] vrandmember(byte[] key)
Time complexity: O(1)
key - the name of the key that holds the vector set@Experimental java.util.List<byte[]> vrandmember(byte[] 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 byte[] vgetattr(byte[] key, byte[] 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(byte[] key, byte[] element, byte[] 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 stringCopyright © 2025. All rights reserved.