From 800ec69565e348afc14c11ab147cb202d9050f0b Mon Sep 17 00:00:00 2001 From: Simon Prickett Date: Thu, 9 Dec 2021 23:11:15 +0000 Subject: [PATCH] Attempts to fix full text search fields Adds field name alias to fix full text searches. Closes #42 --- aredis_om/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aredis_om/model/model.py b/aredis_om/model/model.py index 7d75030..8a1fac2 100644 --- a/aredis_om/model/model.py +++ b/aredis_om/model/model.py @@ -1429,7 +1429,7 @@ class HashModel(RedisModel, abc.ABC): 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}"