mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
fix: reject combined-fields queries on legacy Enterprise servers (#5343)
Closes #5340. Reject `CombinedFields` before sending an FTS query to a LanceDB Enterprise server older than 0.3.0. The check follows all Boolean clauses and both sides of a Boost query. The 0.3.0 regression test also checks that unequal column weights and the `AND` operator reach the server. Reproduced with Python SDK 0.42.1 against a mock 0.2.0 server. Both searches returned HTTP 200. The top-level query lost its weights and operator, and the nested Boolean query sent an empty string. The same searches preserved the structured query on 0.3.0.
This commit is contained in:
@@ -829,6 +829,9 @@ The query below finds `car` in `text` and `merrily` in `text2`, returning rows 1
|
||||
and 3. The same query with `MultiMatchQuery` returns no rows, because neither
|
||||
column contains both words on its own.
|
||||
|
||||
On LanceDB Enterprise, combined-fields queries require server version 0.3.0 or
|
||||
later, including when nested in a Boolean or boost query.
|
||||
|
||||
Every column must use the same tokenizer configuration. The two indexes in this
|
||||
example are built with the same `FTS` settings. Boosts work as they do for
|
||||
`MultiMatchQuery`: one weight per column, each at least 1.
|
||||
|
||||
Reference in New Issue
Block a user