diff --git a/tildes/tildes/models/comment/comment_query.py b/tildes/tildes/models/comment/comment_query.py index 509c623..ff5b01b 100644 --- a/tildes/tildes/models/comment/comment_query.py +++ b/tildes/tildes/models/comment/comment_query.py @@ -96,7 +96,9 @@ class CommentQuery(PaginatedQuery): def search(self, query: str) -> "CommentQuery": """Restrict the comments to ones that match a search query (generative).""" - return self.filter(Comment.search_tsv.op("@@")(func.plainto_tsquery(query))) + return self.filter( + Comment.search_tsv.op("@@")(func.websearch_to_tsquery(query)) + ) def only_bookmarked(self) -> "CommentQuery": """Restrict the comments to ones that the user has bookmarked (generative).""" diff --git a/tildes/tildes/models/topic/topic_query.py b/tildes/tildes/models/topic/topic_query.py index 0609170..1f0bea6 100644 --- a/tildes/tildes/models/topic/topic_query.py +++ b/tildes/tildes/models/topic/topic_query.py @@ -175,7 +175,7 @@ class TopicQuery(PaginatedQuery): def search(self, query: str) -> "TopicQuery": """Restrict the topics to ones that match a search query (generative).""" - return self.filter(Topic.search_tsv.op("@@")(func.plainto_tsquery(query))) + return self.filter(Topic.search_tsv.op("@@")(func.websearch_to_tsquery(query))) def only_bookmarked(self) -> "TopicQuery": """Restrict the topics to ones that the user has bookmarked (generative)."""