You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: CombinedFieldsQuery (BM25F) in the Python SDK #4652
Lance added combined_fields (BM25F) full text search, and pylance exposes it as lance.query.CombinedFieldsQuery (lance-format/lance#8550). LanceDB already depends on a Lance version with FtsQuery::CombinedFields, but the Python SDK has no class for it, and python/src/query.rs returns "Combined-fields FTS queries are not yet supported in Python" when converting one back to Python. lance-format/lance#9661 also notes that the LanceDB side still needs wiring.
Unlike MultiMatchQuery, which scores each column on its own and keeps the best one, combined fields treat the columns as one field. For example, with a row whose title is "john" and whose body is "smith", an AND query for "john smith" matches it with combined fields but not with multi match.
Boost validation would come from Lance (each weight at least 1, one per column), the same way MultiMatchQuery boosts are checked today. I have this ready with tests for Python and can open a PR. TypeScript could follow separately.
@BHAWESHBHASKAR Would a separate TypeScript SDK follow-up be welcome? I checked main at 37b46f6: the native query-type getter handles CombinedFields, but the Node factory and public TypeScript class/export are still missing.
I would keep the Python work with you and mirror the existing MultiMatchQuery constructor shape, adding the N-API factory, public type/export, generated declarations, and docs. Validation would include a real local FTS index with terms split across title/body (AND versus MultiMatch), OR, boosts and invalid inputs, Boolean composition, and existing MultiMatch behavior. Remote serialization tests would be separate from any claim of Cloud support.
Is that split/API shape appropriate, and is anyone already handling the TypeScript side? This preparation is AI-assisted; I have not built or tested a native implementation yet.
Yes, a separate TypeScript follow-up would be welcome, and nobody is handling that side as far as I know. I kept #4691 to Python on purpose, and I'm not planning a TypeScript PR.
Your reading of main matches mine: nodejs/src/query.rs already returns "combined_fields" from the query-type getter, but there is no combined_fields_query factory next to multi_match_query, and no CombinedFieldsQuery class or export in nodejs/lancedb/query.ts and index.ts.
Mirroring the MultiMatchQuery constructor shape (query, columns, { boosts, operator }) sounds right. Two things worth matching from the Python side: boost validation comes from Lance (one weight per column, each at least 1), so the binding only needs to pass them through; and the docs currently say Python only, so once your PR lands please update the note in docs/web/search/full-text-search.mdx and add a TypeScript tab to the combined-fields example.
If you want, open the PR and reference this issue; I'm happy to review.
Activity
Claire-ovo commentedon Oct 27, 2026
@BHAWESHBHASKAR Would a separate TypeScript SDK follow-up be welcome? I checked main at 37b46f6: the native query-type getter handles CombinedFields, but the Node factory and public TypeScript class/export are still missing.
I would keep the Python work with you and mirror the existing MultiMatchQuery constructor shape, adding the N-API factory, public type/export, generated declarations, and docs. Validation would include a real local FTS index with terms split across title/body (AND versus MultiMatch), OR, boosts and invalid inputs, Boolean composition, and existing MultiMatch behavior. Remote serialization tests would be separate from any claim of Cloud support.
Is that split/API shape appropriate, and is anyone already handling the TypeScript side? This preparation is AI-assisted; I have not built or tested a native implementation yet.
BHAWESHBHASKAR commentedon Oct 28, 2026
Yes, a separate TypeScript follow-up would be welcome, and nobody is handling that side as far as I know. I kept #4691 to Python on purpose, and I'm not planning a TypeScript PR.
Your reading of main matches mine:
nodejs/src/query.rsalready returns"combined_fields"from the query-type getter, but there is nocombined_fields_queryfactory next tomulti_match_query, and noCombinedFieldsQueryclass or export innodejs/lancedb/query.tsandindex.ts.Mirroring the
MultiMatchQueryconstructor shape (query, columns, { boosts, operator }) sounds right. Two things worth matching from the Python side: boost validation comes from Lance (one weight per column, each at least 1), so the binding only needs to pass them through; and the docs currently say Python only, so once your PR lands please update the note indocs/web/search/full-text-search.mdxand add a TypeScript tab to the combined-fields example.If you want, open the PR and reference this issue; I'm happy to review.
feat(python): add CombinedFieldsQuery for BM25F full text search