Commit 2660e2f
committed
feat: add native support for UNF and NOINDEX field attributes (#374)
Implements native support for Redis field attributes UNF (un-normalized form) and NOINDEX
to provide more control over field indexing and sorting behavior.
BREAKING CHANGE: None - all changes are backward compatible with default values
- Add `no_index` attribute to BaseFieldAttributes for all field types
- Add `unf` attribute to TextFieldAttributes and NumericFieldAttributes
- Both attributes default to False maintaining backward compatibility
Field Support:
- TextField: Supports both no_index and unf attributes
- NumericField: Supports both no_index and unf attributes
- TagField: Supports no_index attribute
- GeoField: Supports no_index attribute
Technical Implementation:
- NOINDEX implemented via redis-py's native no_index parameter
- UNF added via args_suffix manipulation with proper ordering
- Both attributes require sortable=True to take effect
- Special parsing logic handles Redis auto-adding UNF to sortable numeric fields
Fixes #3741 parent 81f7e85 commit 2660e2f
File tree
4 files changed
+724
-9
lines changed- redisvl
- redis
- schema
- tests
- integration
- unit
4 files changed
+724
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
155 | 165 | | |
156 | 166 | | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
185 | | - | |
| 191 | + | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
226 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
227 | 249 | | |
228 | 250 | | |
229 | 251 | | |
| |||
253 | 275 | | |
254 | 276 | | |
255 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
256 | 282 | | |
257 | 283 | | |
258 | 284 | | |
| |||
277 | 303 | | |
278 | 304 | | |
279 | 305 | | |
280 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
281 | 324 | | |
282 | 325 | | |
283 | 326 | | |
| |||
301 | 344 | | |
302 | 345 | | |
303 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
304 | 351 | | |
305 | 352 | | |
306 | 353 | | |
| |||
0 commit comments