Skip to content

Commit

Permalink
Attempts to fix full text search fields
Browse files Browse the repository at this point in the history
Adds field name alias to fix full text searches.

Closes redis#42
  • Loading branch information
Simon Prickett authored Dec 9, 2021
1 parent 66fdb8a commit 800ec69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aredis_om/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
if getattr(field_info, "full_text_search", False) is True:
schema = (
f"{name} TAG SEPARATOR {SINGLE_VALUE_TAG_FIELD_SEPARATOR} "
f"{name}_fts TEXT"
f"{name} AS {name}_fts TEXT"
)
else:
schema = f"{name} TAG SEPARATOR {SINGLE_VALUE_TAG_FIELD_SEPARATOR}"
Expand Down

0 comments on commit 800ec69

Please sign in to comment.