Skip to content

Commit 6bfaa28

Browse files
committed
Support new vector type
1 parent 50773ec commit 6bfaa28

File tree

2 files changed

+818
-4
lines changed

2 files changed

+818
-4
lines changed

redis/commands/search/field.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def __init__(self, name: str, algorithm: str, attributes: dict, **kwargs):
181181
182182
``name`` is the name of the field.
183183
184-
``algorithm`` can be "FLAT" or "HNSW".
184+
``algorithm`` can be "FLAT", "HNSW", or "SVS-VAMANA".
185185
186186
``attributes`` each algorithm can have specific attributes. Some of them
187187
are mandatory and some of them are optional. See
@@ -194,10 +194,10 @@ def __init__(self, name: str, algorithm: str, attributes: dict, **kwargs):
194194
if sort or noindex:
195195
raise DataError("Cannot set 'sortable' or 'no_index' in Vector fields.")
196196

197-
if algorithm.upper() not in ["FLAT", "HNSW"]:
197+
if algorithm.upper() not in ["FLAT", "HNSW", "SVS-VAMANA"]:
198198
raise DataError(
199-
"Realtime vector indexing supporting 2 Indexing Methods:"
200-
"'FLAT' and 'HNSW'."
199+
"Realtime vector indexing supporting 3 Indexing Methods:"
200+
"'FLAT', 'HNSW', and 'SVS-VAMANA'."
201201
)
202202

203203
attr_li = []

0 commit comments

Comments
 (0)