fix: .phrase_query() not working (#2781)

The `self._query` value was not set when wrapping its copy `query` with
quotation marks.

The test for phrase queries has been updated to test the
`.phrase_query()` method as well, which will catch this bug.

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
This commit is contained in:
Jackson Hew
2025-11-21 05:32:37 +11:00
committed by GitHub
parent 0084eb238b
commit bb6b0bea0c
3 changed files with 10 additions and 3 deletions

View File

@@ -1487,7 +1487,7 @@ def setup_hybrid_search_table(db: DBConnection, embedding_func):
table.add([{"text": p} for p in phrases])
# Create a fts index
table.create_fts_index("text")
table.create_fts_index("text", with_position=True)
return table, MyTable, emb