File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ import os
12from datetime import timedelta
23
34import pytest
2122 Text ,
2223 Timestamp ,
2324)
25+ from redisvl .redis .connection import compare_versions
2426from redisvl .redis .utils import array_to_buffer
2527
26- # TODO expand to multiple schema types and sync + async
27-
2828
2929@pytest .fixture
3030def vector_query ():
@@ -961,6 +961,14 @@ def missing_fields_index(worker_id, redis_url):
961961 # Create the index
962962 missing_index .create (overwrite = True )
963963
964+ # Skip all missing field tests if Redis version doesn't support INDEXMISSING/INDEXEMPTY (requires Redis 7.4+)
965+ redis_version = missing_index .client .info ()["redis_version" ]
966+ if not compare_versions (redis_version , "7.4.0" ):
967+ missing_index .delete (drop = True ) # Clean up before skipping
968+ pytest .skip (
969+ "INDEXMISSING/INDEXEMPTY features require Redis 7.4+ (RediSearch 2.10+)"
970+ )
971+
964972 # Load test data with different missing field scenarios
965973 test_data = [
966974 {
You can’t perform that action at this time.
0 commit comments