Skip to content

Commit

Permalink
table name quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
jlonge4 committed Apr 10, 2024
1 parent ffdff8a commit 654959e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 654959e

Please sign in to comment.