Repository navigation
feat(search): include _rowid in lance_fts and lance_hybrid_search results - #257
jackylee-ch wants to merge 1 commit into
Conversation
…ults lance_fts and lance_hybrid_search did not surface Lance's row id, so hits could not be joined back to the dataset. Add _rowid (UInt64) next to the existing _score/_distance pseudo-columns: the FTS scans enable with_row_id and project it, and the hybrid path emits the row ids it already computes while ranking.
|
Thanks! The direct-path |
There was a problem hiding this comment.
Your sequencing note prompted me to recalibrate the earlier namespace requirement. This patch can be accepted independently: the direct FTS and hybrid paths return row IDs that join back correctly, and the namespace omission predates this diff.
The non-blocking limitation is that namespace-backed FTS still cannot expose _rowid. I’m withdrawing the requirement to include that extension before merge; namespace support can follow separately.
lance_fts and lance_hybrid_search did not surface Lance's row id, so hits could not be joined back to the dataset. This adds
_rowid(UInt64) next to the existing_score/_distancepseudo-columns.The FTS schema and stream now enable
with_row_id()and project_rowid; the hybrid path emits the row ids it already computes while ranking. The C++ binds read the Arrow schema dynamically, so no change is needed there.Testing
GEN=ninja make test_release— search_functions.test covers_rowidon both functions (fails without the projection, passes with it).