Skip to content

Commit 800ec69

Browse files
author
Simon Prickett
authored
Attempts to fix full text search fields
Adds field name alias to fix full text searches. Closes #42
1 parent 66fdb8a commit 800ec69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aredis_om/model/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ def schema_for_type(cls, name, typ: Any, field_info: PydanticFieldInfo):
14291429
if getattr(field_info, "full_text_search", False) is True:
14301430
schema = (
14311431
f"{name} TAG SEPARATOR {SINGLE_VALUE_TAG_FIELD_SEPARATOR} "
1432-
f"{name}_fts TEXT"
1432+
f"{name} AS {name}_fts TEXT"
14331433
)
14341434
else:
14351435
schema = f"{name} TAG SEPARATOR {SINGLE_VALUE_TAG_FIELD_SEPARATOR}"

0 commit comments

Comments
 (0)