33import java .util .List ;
44import java .util .Map ;
55
6+ import redis .clients .jedis .annots .Experimental ;
67import redis .clients .jedis .params .VAddParams ;
78import redis .clients .jedis .params .VSimParams ;
89import redis .clients .jedis .resps .RawVector ;
@@ -23,6 +24,7 @@ public interface VectorSetBinaryCommands {
2324 * @param element the name of the element that is being added to the vector set
2425 * @return 1 if key was added; 0 if key was not added
2526 */
27+ @ Experimental
2628 boolean vadd (byte [] key , float [] vector , byte [] element );
2729
2830 /**
@@ -36,6 +38,7 @@ public interface VectorSetBinaryCommands {
3638 * @param params additional parameters for the VADD command
3739 * @return 1 if key was added; 0 if key was not added
3840 */
41+ @ Experimental
3942 boolean vadd (byte [] key , float [] vector , byte [] element , VAddParams params );
4043
4144 /**
@@ -48,6 +51,7 @@ public interface VectorSetBinaryCommands {
4851 * @param element the name of the element that is being added to the vector set
4952 * @return 1 if key was added; 0 if key was not added
5053 */
54+ @ Experimental
5155 boolean vaddFP32 (byte [] key , byte [] vectorBlob , byte [] element );
5256
5357 /**
@@ -61,6 +65,7 @@ public interface VectorSetBinaryCommands {
6165 * @param params additional parameters for the VADD command
6266 * @return 1 if key was added; 0 if key was not added
6367 */
68+ @ Experimental
6469 boolean vaddFP32 (byte [] key , byte [] vectorBlob , byte [] element , VAddParams params );
6570
6671 /**
@@ -75,6 +80,7 @@ public interface VectorSetBinaryCommands {
7580 * @param params additional parameters for the VADD command
7681 * @return 1 if key was added; 0 if key was not added
7782 */
83+ @ Experimental
7884 boolean vadd (byte [] key , float [] vector , byte [] element , int reduceDim , VAddParams params );
7985
8086 /**
@@ -89,6 +95,7 @@ public interface VectorSetBinaryCommands {
8995 * @param params additional parameters for the VADD command
9096 * @return 1 if key was added; 0 if key was not added
9197 */
98+ @ Experimental
9299 boolean vaddFP32 (byte [] key , byte [] vectorBlob , byte [] element , int reduceDim , VAddParams params );
93100
94101 /**
@@ -100,6 +107,7 @@ public interface VectorSetBinaryCommands {
100107 * @param vector the vector to use as similarity reference
101108 * @return list of similar elements
102109 */
110+ @ Experimental
103111 List <byte []> vsim (byte [] key , float [] vector );
104112
105113 /**
@@ -112,6 +120,7 @@ public interface VectorSetBinaryCommands {
112120 * @param params additional parameters for the VSIM command
113121 * @return list of similar elements
114122 */
123+ @ Experimental
115124 List <byte []> vsim (byte [] key , float [] vector , VSimParams params );
116125
117126 /**
@@ -124,6 +133,7 @@ public interface VectorSetBinaryCommands {
124133 * @param params additional parameters for the VSIM command (WITHSCORES will be automatically added)
125134 * @return map of element names to their similarity scores
126135 */
136+ @ Experimental
127137 Map <byte [], Double > vsimWithScores (byte [] key , float [] vector , VSimParams params );
128138
129139 /**
@@ -135,6 +145,7 @@ public interface VectorSetBinaryCommands {
135145 * @param element the name of the element to use as similarity reference
136146 * @return list of similar elements
137147 */
148+ @ Experimental
138149 List <byte []> vsimByElement (byte [] key , byte [] element );
139150
140151 /**
@@ -147,6 +158,7 @@ public interface VectorSetBinaryCommands {
147158 * @param params additional parameters for the VSIM command
148159 * @return list of similar elements
149160 */
161+ @ Experimental
150162 List <byte []> vsimByElement (byte [] key , byte [] element , VSimParams params );
151163
152164 /**
@@ -159,6 +171,7 @@ public interface VectorSetBinaryCommands {
159171 * @param params additional parameters for the VSIM command (WITHSCORES will be automatically added)
160172 * @return map of element names to their similarity scores
161173 */
174+ @ Experimental
162175 Map <byte [], Double > vsimByElementWithScores (byte [] key , byte [] element , VSimParams params );
163176
164177 /**
@@ -169,6 +182,7 @@ public interface VectorSetBinaryCommands {
169182 * @param key the name of the key that holds the vector set
170183 * @return the number of vector set elements
171184 */
185+ @ Experimental
172186 long vdim (byte [] key );
173187
174188 /**
@@ -179,6 +193,7 @@ public interface VectorSetBinaryCommands {
179193 * @param key the name of the key that holds the vector set
180194 * @return the number of elements in the vector set
181195 */
196+ @ Experimental
182197 long vcard (byte [] key );
183198
184199 /**
@@ -190,6 +205,7 @@ public interface VectorSetBinaryCommands {
190205 * @param element the name of the element whose vector you want to retrieve
191206 * @return list of real numbers representing the vector
192207 */
208+ @ Experimental
193209 List <Double > vemb (byte [] key , byte [] element );
194210
195211 /**
@@ -212,6 +228,7 @@ public interface VectorSetBinaryCommands {
212228 * @param element the name of the element to remove from the vector set
213229 * @return true if the element was removed, false if either element or key do not exist
214230 */
231+ @ Experimental
215232 boolean vrem (byte [] key , byte [] element );
216233
217234 /**
@@ -223,6 +240,7 @@ public interface VectorSetBinaryCommands {
223240 * @param element the name of the element whose HNSW neighbors you want to inspect
224241 * @return list of neighbor element names
225242 */
243+ @ Experimental
226244 List <List <byte []>> vlinks (byte [] key , byte [] element );
227245
228246 /**
@@ -232,8 +250,9 @@ public interface VectorSetBinaryCommands {
232250 * Time complexity: O(1)
233251 * @param key the name of the key that holds the vector set
234252 * @param element the name of the element whose HNSW neighbors you want to inspect
235- * @return map of neighbor element names to similarity scores
253+ * @return List of map of neighbor element names to similarity scores per layer
236254 */
255+ @ Experimental
237256 List <Map <byte [], Double >> vlinksWithScores (byte [] key , byte [] element );
238257
239258 /**
@@ -244,6 +263,7 @@ public interface VectorSetBinaryCommands {
244263 * @param key the name of the key that holds the vector set
245264 * @return a random element name, or null if the key does not exist
246265 */
266+ @ Experimental
247267 byte [] vrandmember (byte [] key );
248268
249269 /**
@@ -255,6 +275,7 @@ public interface VectorSetBinaryCommands {
255275 * @param count the number of elements to return. Positive values return distinct elements; negative values allow duplicates
256276 * @return list of random element names
257277 */
278+ @ Experimental
258279 List <byte []> vrandmember (byte [] key , int count );
259280
260281 /**
@@ -266,6 +287,7 @@ public interface VectorSetBinaryCommands {
266287 * @param element the name of the element whose attributes to retrieve
267288 * @return the attributes of the element as a JSON string, or null if the element doesn't exist or has no attributes
268289 */
290+ @ Experimental
269291 byte [] vgetattr (byte [] key , byte [] element );
270292
271293 /**
@@ -278,5 +300,6 @@ public interface VectorSetBinaryCommands {
278300 * @param attributes the attributes to set as a JSON string
279301 * @return true if the attributes were set successfully
280302 */
303+ @ Experimental
281304 boolean vsetattr (byte [] key , byte [] element , byte [] attributes );
282305}
0 commit comments