Skip to content

Commit b4d8b1f

Browse files
author
Nitin Kanukolanu
committed
Update schema docs with SVS
1 parent a21bb4e commit b4d8b1f

File tree

1 file changed

+55
-7
lines changed

1 file changed

+55
-7
lines changed

docs/api/schema.rst

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,64 @@ Each field type supports specific attributes that customize its behavior. Below
9797
**Common Vector Field Attributes**:
9898

9999
- `dims`: Dimensionality of the vector.
100-
- `algorithm`: Indexing algorithm (`flat` or `hnsw`).
101-
- `datatype`: Float datatype of the vector (`bfloat16`, `float16`, `float32`, `float64`).
100+
- `algorithm`: Indexing algorithm (`flat`, `hnsw`, or `svs-vamana`).
101+
- `datatype`: Float datatype of the vector (`bfloat16`, `float16`, `float32`, `float64`). Note: SVS-VAMANA only supports `float16` and `float32`.
102102
- `distance_metric`: Metric for measuring query relevance (`COSINE`, `L2`, `IP`).
103+
- `initial_cap`: Initial capacity for the index (optional).
104+
- `index_missing`: When True, allows searching for documents missing this field (optional).
105+
106+
**FLAT Vector Field Specific Attributes**:
107+
108+
- `block_size`: Block size for the FLAT index (optional).
103109

104110
**HNSW Vector Field Specific Attributes**:
105111

106-
- `m`: Max outgoing edges per node in each layer.
107-
- `ef_construction`: Max edge candidates during build time.
108-
- `ef_runtime`: Max top candidates during search.
109-
- `epsilon`: Range search boundary factor.
112+
- `m`: Max outgoing edges per node in each layer (default: 16).
113+
- `ef_construction`: Max edge candidates during build time (default: 200).
114+
- `ef_runtime`: Max top candidates during search (default: 10).
115+
- `epsilon`: Range search boundary factor (default: 0.01).
116+
117+
**SVS-VAMANA Vector Field Specific Attributes**:
118+
119+
SVS-VAMANA (Scalable Vector Search with VAMANA graph algorithm) provides fast approximate nearest neighbor search with optional compression support. This algorithm is optimized for Intel hardware and offers reduced memory usage through vector compression.
120+
121+
- `graph_max_degree`: Maximum degree of the Vamana graph, i.e., the number of edges per node (default: 40).
122+
- `construction_window_size`: Size of the candidate list during graph construction. Higher values yield better quality graphs but increase construction time (default: 250).
123+
- `search_window_size`: Size of the candidate list during search. Higher values increase accuracy but also increase search latency (default: 20).
124+
- `epsilon`: Relative factor for range query boundaries (default: 0.01).
125+
- `compression`: Optional vector compression algorithm. Supported types:
126+
127+
- `LVQ4`: 4-bit Learned Vector Quantization
128+
- `LVQ4x4`: 4-bit LVQ with 4x compression
129+
- `LVQ4x8`: 4-bit LVQ with 8x compression
130+
- `LVQ8`: 8-bit Learned Vector Quantization
131+
- `LeanVec4x8`: 4-bit LeanVec with 8x compression and dimensionality reduction
132+
- `LeanVec8x8`: 8-bit LeanVec with 8x compression and dimensionality reduction
133+
134+
- `reduce`: Reduced dimensionality for LeanVec compression. Must be less than `dims`. Only valid with `LeanVec4x8` or `LeanVec8x8` compression types. Lowering this value can speed up search and reduce memory usage (optional).
135+
- `training_threshold`: Minimum number of vectors required before compression training begins. Must be less than 100 * 1024 (default: 10 * 1024).
136+
137+
**SVS-VAMANA Example**:
138+
139+
.. code-block:: yaml
140+
141+
- name: embedding
142+
type: vector
143+
attrs:
144+
algorithm: svs-vamana
145+
dims: 768
146+
distance_metric: cosine
147+
datatype: float32
148+
graph_max_degree: 64
149+
construction_window_size: 500
150+
search_window_size: 40
151+
compression: LeanVec4x8
152+
reduce: 384
153+
training_threshold: 1000
110154
111155
Note:
112-
See fully documented Redis-supported fields and options here: https://redis.io/commands/ft.create/
156+
- SVS-VAMANA requires Redis >= 8.2 with RediSearch >= 2.8.10.
157+
- SVS-VAMANA only supports `float16` and `float32` datatypes.
158+
- The `reduce` parameter is only valid with LeanVec compression types (`LeanVec4x8` or `LeanVec8x8`).
159+
- Intel's proprietary LVQ and LeanVec optimizations are not available in Redis Open Source. On non-Intel platforms and Redis Open Source, SVS-VAMANA with compression falls back to basic 8-bit scalar quantization.
160+
- See fully documented Redis-supported fields and options here: https://redis.io/commands/ft.create/

0 commit comments

Comments
 (0)