diff --git a/langchain_postgres/v2/async_vectorstore.py b/langchain_postgres/v2/async_vectorstore.py index c83930e..fce62bc 100644 --- a/langchain_postgres/v2/async_vectorstore.py +++ b/langchain_postgres/v2/async_vectorstore.py @@ -650,7 +650,7 @@ async def __query_collection( if hybrid_search_config.tsv_lang else "" ) - query_tsv = f"plainto_tsquery({lang} :fts_query)" + query_tsv = fr"websearch_to_tsquery({lang} regexp_replace(:fts_query, '\s', ' OR ', 'g'))" param_dict["fts_query"] = fts_query if hybrid_search_config.tsv_column: content_tsv = f'"{hybrid_search_config.tsv_column}"'