Structured full-text queries for LanceDB.Query.full_text_search/3,
LanceDB.Query.hybrid_search/4, and reusable queries built with LanceDB.Query.text/2.
Builders return query values directly; invalid arguments raise ArgumentError.
A leaf's :column takes precedence over the search's :text_column default.
Without either, structured queries require exactly one indexed text column.
Summary
Functions
Combines query lists in :must, :should, and :must_not clauses.
At least one positive clause is required. With :must, :should clauses
contribute scores but are optional; without :must, at least one should match.
Children can be structured queries or plain strings.
Matches positive and subtracts negative_boost * negative_score from the
score of rows also matching negative. :negative_boost is a non-negative
float32 number (default 0.5). Scores can become negative; rows are not excluded.
Use a Boolean :must_not clause to exclude matches.
Matches a scalar at a dotted path inside an index using document_tokenizer: :json.
Values are strings, numbers, booleans or nil. Accepts match/2 options except fuzzy matching.
The pinned tokenizer cannot escape semicolons in values, or commas/semicolons in paths.
Matches terms. Options: :column, :operator (:or default, or :and),
:boost (positive float32 number, default 1), :fuzziness (0 default, 1, or 2),
:max_expansions (positive uint32, default 50), and
:prefix_length (non-negative uint32, default 0).
Positive prefix lengths require ASCII query text. Automatic fuzziness is
not exposed because this SDK treats it as an exact query.
Matches terms across named columns. Options: :operator (:or or :and)
and :boosts (one positive float32 number per column, default all 1).
AND applies to terms within each column, not across columns.
Matches a phrase. Options: :column and non-negative :slop (default 0). Requires an FTS index storing positions.
Types
Functions
Combines query lists in :must, :should, and :must_not clauses.
At least one positive clause is required. With :must, :should clauses
contribute scores but are optional; without :must, at least one should match.
Children can be structured queries or plain strings.
Matches positive and subtracts negative_boost * negative_score from the
score of rows also matching negative. :negative_boost is a non-negative
float32 number (default 0.5). Scores can become negative; rows are not excluded.
Use a Boolean :must_not clause to exclude matches.
Matches a scalar at a dotted path inside an index using document_tokenizer: :json.
Values are strings, numbers, booleans or nil. Accepts match/2 options except fuzzy matching.
The pinned tokenizer cannot escape semicolons in values, or commas/semicolons in paths.
Matches terms. Options: :column, :operator (:or default, or :and),
:boost (positive float32 number, default 1), :fuzziness (0 default, 1, or 2),
:max_expansions (positive uint32, default 50), and
:prefix_length (non-negative uint32, default 0).
Positive prefix lengths require ASCII query text. Automatic fuzziness is
not exposed because this SDK treats it as an exact query.
Matches terms across named columns. Options: :operator (:or or :and)
and :boosts (one positive float32 number per column, default all 1).
AND applies to terms within each column, not across columns.
Matches a phrase. Options: :column and non-negative :slop (default 0). Requires an FTS index storing positions.