@@ -1032,14 +1032,14 @@ class FieldInfo(PydanticFieldInfo):
1032
1032
def __init__ (self , default : Any = Undefined , ** kwargs : Any ) -> None :
1033
1033
primary_key = kwargs .pop ("primary_key" , False )
1034
1034
sortable = kwargs .pop ("sortable" , Undefined )
1035
- casesensitive = kwargs .pop ("casesensitive " , Undefined )
1035
+ case_sensitive = kwargs .pop ("case_sensitive " , Undefined )
1036
1036
index = kwargs .pop ("index" , Undefined )
1037
1037
full_text_search = kwargs .pop ("full_text_search" , Undefined )
1038
1038
vector_options = kwargs .pop ("vector_options" , None )
1039
1039
super ().__init__ (default = default , ** kwargs )
1040
1040
self .primary_key = primary_key
1041
1041
self .sortable = sortable
1042
- self .casesensitive = casesensitive
1042
+ self .case_sensitive = case_sensitive
1043
1043
self .index = index
1044
1044
self .full_text_search = full_text_search
1045
1045
self .vector_options = vector_options
@@ -1171,7 +1171,7 @@ def Field(
1171
1171
regex : Optional [str ] = None ,
1172
1172
primary_key : bool = False ,
1173
1173
sortable : Union [bool , UndefinedType ] = Undefined ,
1174
- casesensitive : Union [bool , UndefinedType ] = Undefined ,
1174
+ case_sensitive : Union [bool , UndefinedType ] = Undefined ,
1175
1175
index : Union [bool , UndefinedType ] = Undefined ,
1176
1176
full_text_search : Union [bool , UndefinedType ] = Undefined ,
1177
1177
vector_options : Optional [VectorFieldOptions ] = None ,
@@ -1200,7 +1200,7 @@ def Field(
1200
1200
regex = regex ,
1201
1201
primary_key = primary_key ,
1202
1202
sortable = sortable ,
1203
- casesensitive = casesensitive ,
1203
+ case_sensitive = case_sensitive ,
1204
1204
index = index ,
1205
1205
full_text_search = full_text_search ,
1206
1206
vector_options = vector_options ,
@@ -1768,7 +1768,7 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
1768
1768
# TODO: Abstract string-building logic for each type (TAG, etc.) into
1769
1769
# classes that take a field name.
1770
1770
sortable = getattr (field_info , "sortable" , False )
1771
- casesensitive = getattr (field_info , "casesensitive " , False )
1771
+ case_sensitive = getattr (field_info , "case_sensitive " , False )
1772
1772
1773
1773
if is_supported_container_type (typ ):
1774
1774
embedded_cls = get_args (typ )
@@ -1809,7 +1809,7 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
1809
1809
schema = f"{ name } TAG SEPARATOR { SINGLE_VALUE_TAG_FIELD_SEPARATOR } "
1810
1810
if schema and sortable is True :
1811
1811
schema += " SORTABLE"
1812
- if schema and casesensitive is True :
1812
+ if schema and case_sensitive is True :
1813
1813
schema += " CASESENSITIVE"
1814
1814
1815
1815
return schema
@@ -2054,7 +2054,7 @@ def schema_for_type(
2054
2054
else :
2055
2055
path = f"{ json_path } .{ name } "
2056
2056
sortable = getattr (field_info , "sortable" , False )
2057
- casesensitive = getattr (field_info , "casesensitive " , False )
2057
+ case_sensitive = getattr (field_info , "case_sensitive " , False )
2058
2058
full_text_search = getattr (field_info , "full_text_search" , False )
2059
2059
sortable_tag_error = RedisModelError (
2060
2060
"In this Preview release, TAG fields cannot "
@@ -2085,7 +2085,7 @@ def schema_for_type(
2085
2085
schema = f"{ path } AS { index_field_name } TAG SEPARATOR { SINGLE_VALUE_TAG_FIELD_SEPARATOR } "
2086
2086
if sortable is True :
2087
2087
raise sortable_tag_error
2088
- if casesensitive is True :
2088
+ if case_sensitive is True :
2089
2089
schema += " CASESENSITIVE"
2090
2090
elif any (issubclass (typ , t ) for t in NUMERIC_TYPES ):
2091
2091
schema = f"{ path } AS { index_field_name } NUMERIC"
@@ -2102,13 +2102,13 @@ def schema_for_type(
2102
2102
# search queries can be sorted, but not exact match
2103
2103
# queries.
2104
2104
schema += " SORTABLE"
2105
- if casesensitive is True :
2105
+ if case_sensitive is True :
2106
2106
raise RedisModelError ("Text fields cannot be case-sensitive." )
2107
2107
else :
2108
2108
schema = f"{ path } AS { index_field_name } TAG SEPARATOR { SINGLE_VALUE_TAG_FIELD_SEPARATOR } "
2109
2109
if sortable is True :
2110
2110
raise sortable_tag_error
2111
- if casesensitive is True :
2111
+ if case_sensitive is True :
2112
2112
schema += " CASESENSITIVE"
2113
2113
else :
2114
2114
schema = f"{ path } AS { index_field_name } TAG SEPARATOR { SINGLE_VALUE_TAG_FIELD_SEPARATOR } "
0 commit comments