Skip to content

Commit cfc50b8

Browse files
author
Andrew Brookins
committed
Cleanup
1 parent a3a14e9 commit cfc50b8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

redis_developer/model/model.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -376,20 +376,19 @@ def resolve_field_type(field: ModelField, op: Operators) -> RediSearchFieldTypes
376376
container_type = get_origin(field_type)
377377

378378
if is_supported_container_type(container_type):
379-
# NOTE: A list of integers, like:
379+
# NOTE: A list of strings, like:
380380
#
381-
# luck_numbers: List[int] = field(index=True)
381+
# tarot_cards: List[str] = field(index=True)
382382
#
383-
# becomes a TAG field, which means that users cannot perform range
384-
# queries on the values within the multi-value field, only equality
385-
# and membership queries.
383+
# becomes a TAG field, which means that users can run equality and
384+
# membership queries on values.
386385
#
387386
# Meanwhile, a list of RedisModels, like:
388387
#
389388
# friends: List[Friend] = field(index=True)
390389
#
391390
# is not itself directly indexed, but instead, we index any fields
392-
# within the model marked as `index=True`.
391+
# within the model inside the list marked as `index=True`.
393392
return RediSearchFieldTypes.TAG
394393
elif container_type is not None:
395394
raise QuerySyntaxError("Only lists and tuples are supported for multi-value fields. "
@@ -399,9 +398,10 @@ def resolve_field_type(field: ModelField, op: Operators) -> RediSearchFieldTypes
399398
# range queries.
400399
return RediSearchFieldTypes.NUMERIC
401400
else:
402-
# TAG fields are the default field type and support equality and membership queries,
403-
# though membership (and the multi-value nature of the field) are hidden from
404-
# users unless they explicitly index multiple values, with either a list or tuple,
401+
# TAG fields are the default field type and support equality and
402+
# membership queries, though membership (and the multi-value nature
403+
# of the field) are hidden from users unless they explicitly index
404+
# multiple values, with either a list or tuple,
405405
# e.g.,
406406
# favorite_foods: List[str] = field(index=True)
407407
return RediSearchFieldTypes.TAG

0 commit comments

Comments
 (0)