Skip to content

Commit 623b608

Browse files
committed
Update docs
1 parent 7316bf2 commit 623b608

File tree

1 file changed

+69
-12
lines changed

1 file changed

+69
-12
lines changed

docs/api/schema.rst

Lines changed: 69 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,80 @@ Fields in the schema can be defined in YAML format or as a Python dictionary, sp
6060
}
6161
}
6262
63-
Supported Field Types and Attributes
64-
====================================
63+
Basic Field Types
64+
=================
6565

66-
Each field type supports specific attributes that customize its behavior. Below are the field types and their available attributes:
66+
RedisVL supports several basic field types for indexing different kinds of data. Each field type has specific attributes that customize its indexing and search behavior.
6767

68-
**Text Field Attributes**:
68+
Text Fields
69+
-----------
70+
71+
Text fields support full-text search with stemming, phonetic matching, and other text analysis features.
72+
73+
.. currentmodule:: redisvl.schema.fields
74+
75+
.. autoclass:: TextField
76+
:members:
77+
:show-inheritance:
6978

7079
.. autoclass:: TextFieldAttributes
7180
:members:
7281
:undoc-members:
7382

74-
**Tag Field Attributes**:
83+
Tag Fields
84+
----------
85+
86+
Tag fields are optimized for exact-match filtering and faceted search on categorical data.
87+
88+
.. autoclass:: TagField
89+
:members:
90+
:show-inheritance:
7591

7692
.. autoclass:: TagFieldAttributes
7793
:members:
7894
:undoc-members:
7995

80-
**Numeric Field Attributes**:
96+
Numeric Fields
97+
--------------
98+
99+
Numeric fields support range queries and sorting on numeric data.
100+
101+
.. autoclass:: NumericField
102+
:members:
103+
:show-inheritance:
81104

82105
.. autoclass:: NumericFieldAttributes
83106
:members:
84107
:undoc-members:
85108

86-
**Geo Field Attributes**:
109+
Geo Fields
110+
----------
111+
112+
Geo fields enable location-based search with geographic coordinates.
113+
114+
.. autoclass:: GeoField
115+
:members:
116+
:show-inheritance:
87117

88118
.. autoclass:: GeoFieldAttributes
89119
:members:
90120
:undoc-members:
91121

92-
**Common Vector Field Attributes**:
122+
Vector Field Types
123+
==================
124+
125+
Vector fields enable semantic similarity search using various algorithms. All vector fields share common attributes but have algorithm-specific configurations.
126+
127+
Common Vector Attributes
128+
------------------------
129+
130+
All vector field types share these base attributes:
131+
132+
.. autoclass:: BaseVectorFieldAttributes
133+
:members:
134+
:undoc-members:
135+
136+
**Key Attributes:**
93137

94138
- `dims`: Dimensionality of the vector (e.g., 768, 1536).
95139
- `algorithm`: Indexing algorithm for vector search:
@@ -106,7 +150,8 @@ Each field type supports specific attributes that customize its behavior. Below
106150
- `initial_cap`: Initial capacity hint for memory allocation (optional).
107151
- `index_missing`: When True, allows searching for documents missing this field (optional).
108152

109-
**HNSW Vector Field Specific Attributes**:
153+
HNSW Vector Fields
154+
------------------
110155

111156
HNSW (Hierarchical Navigable Small World) - Graph-based approximate search with excellent recall. **Best for general-purpose vector search (10K-1M+ vectors).**
112157

@@ -127,7 +172,9 @@ HNSW (Hierarchical Navigable Small World) - Graph-based approximate search with
127172
- **Recall quality**: Excellent recall rates (95-99%), often better than other approximate methods
128173
- **Build time**: Moderate construction time, faster than SVS-VAMANA for smaller datasets
129174

130-
.. currentmodule:: redisvl.schema.fields
175+
.. autoclass:: HNSWVectorField
176+
:members:
177+
:show-inheritance:
131178

132179
.. autoclass:: HNSWVectorFieldAttributes
133180
:members:
@@ -167,7 +214,8 @@ HNSW (Hierarchical Navigable Small World) - Graph-based approximate search with
167214
ef_construction: 400
168215
ef_runtime: 50
169216
170-
**SVS-VAMANA Vector Field Specific Attributes**:
217+
SVS-VAMANA Vector Fields
218+
------------------------
171219

172220
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. **Best for large datasets (>100K vectors) on Intel hardware with memory constraints.**
173221

@@ -204,6 +252,10 @@ SVS-VAMANA (Scalable Vector Search with VAMANA graph algorithm) provides fast ap
204252

205253
- LeanVec4x8 + reduce to 384: 580 MB (~81% savings)
206254

255+
.. autoclass:: SVSVectorField
256+
:members:
257+
:show-inheritance:
258+
207259
.. autoclass:: SVSVectorFieldAttributes
208260
:members:
209261
:undoc-members:
@@ -254,7 +306,8 @@ SVS-VAMANA (Scalable Vector Search with VAMANA graph algorithm) provides fast ap
254306
- **Platform considerations**: 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.
255307
- **Performance tip**: Start with default parameters and tune `search_window_size` first for your speed vs accuracy requirements.
256308

257-
**FLAT Vector Field Specific Attributes**:
309+
FLAT Vector Fields
310+
------------------
258311

259312
FLAT - Brute-force exact search. **Best for small datasets (<10K vectors) requiring 100% accuracy.**
260313

@@ -277,6 +330,10 @@ FLAT - Brute-force exact search. **Best for small datasets (<10K vectors) requir
277330
- **vs HNSW**: Much slower search but exact results, faster index building
278331
- **vs SVS-VAMANA**: Slower search and higher memory usage, but exact results
279332

333+
.. autoclass:: FlatVectorField
334+
:members:
335+
:show-inheritance:
336+
280337
.. autoclass:: FlatVectorFieldAttributes
281338
:members:
282339
:undoc-members:

0 commit comments

Comments
 (0)