From 654959ecefa669caa9afbda0a4c68f89844731a3 Mon Sep 17 00:00:00 2001 From: jlonge4 Date: Tue, 9 Apr 2024 20:09:27 -0400 Subject: [PATCH] table name quotes --- .../document_stores/pgvector/document_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py b/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py index 2d6a6ede2..b4249ca03 100644 --- a/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py +++ b/integrations/pgvector/src/haystack_integrations/document_stores/pgvector/document_store.py @@ -520,7 +520,7 @@ def _keyword_retrieval( sql_select = SQL( """SELECT *, RANK() OVER (ORDER BY ts_rank_cd(to_tsvector({language}, content), query) DESC) AS rank - FROM "{table_name}", plainto_tsquery({language}, {query}) query + FROM {table_name}, plainto_tsquery({language}, {query}) query WHERE to_tsvector({language}, content) @@ query LIMIT {top_k}""" ).format( table_name=Identifier(self.table_name), language=self.language, query=SQLLiteral(user_query), top_k=top_k