Repository navigation
query: expose row id, fast search and RRF options - #135
Merged
Merged
Conversation
added 3 commits
November 22, 2026 06:39
Add with_row_id and fast_search to the plain and vector query builders, bypass_vector_index to the vector builder, and explicit RRF k plus normalization for hybrid search. These are the remaining Go-main query behaviors from #127 and #131 that the pinned 0.42.0-beta.21 SDK implements. Plain scans and standalone full-text searches gain _rowid and index-only fast search. Vector queries also gain exhaustive index bypass. The RRF setter only affects hybrid vector plus full-text queries, and normalization is wired through the SDK while leaving RRF ranking unchanged because RRF consumes list positions rather than normalized scores. Cover the actual returned keys and _rowid values for fast search and bypass, exact custom/default RRF scores, both normalization methods, and invalid setter arguments.
Assert that bypass removes the pinned scanner's ANN nodes while returning the flat nearest row, and that normalization changes the hybrid result's preserved _score with exact SDK-derived values. Remove duplicate RRF score checks and clarify hybrid fast-search scope, embedded fast-search priority, remote flag forwarding, hybrid EXPLAIN limits and rejected normalization selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the remaining Go-main query behavior from #127 and #131 that the pinned
lancedbv0.42.0-beta.21 SDK supports, without taking over the broader options in #127 (owner: #8) or the rest of #131.Refs #127
Refs #131
API
lancedb_query_with_row_id,lancedb_query_fast_searchlancedb_vector_query_with_row_id,lancedb_vector_query_fast_search,lancedb_vector_query_bypass_vector_indexLanceDBNormalizeMethod(Score,Rank)lancedb_vector_query_rerank_rrf(query, k)lancedb_vector_query_norm(query, method)_relevance_score, but it does change the normalized_scorepreserved in the result.Defaults and unset state are preserved: flags default off, no setter leaves the SDK default RRF
k = 60, andkis forwarded unchanged after an explicit setter. Embedded LanceDB applies fast search after bypass, so fast search wins when both are set; a remote LanceDB forwards both flags to the server. Embedded hybrid EXPLAIN returns the SDK's unsupported-shape error; execution is supported. A rejected normalization value leaves any previous selection unchanged.Out of scope:
QueryExecutionOptions, dynamic projection, take, structured FTS ASTs, new vector types,order_by, and plain-query reranker/postfilter changes.Verification
cargo fmt --checkcheck-abiself-test for host LP64 andx86_64-pc-windows-msvcafter integrating current main: 155 extern functions, 27 structs and 6 enums match, includinglancedb_version()and the new checked enum parameter.-Wall -Wextra -Werror._rowidvalues for plain/vector fast search, ANN-node removal through EXPLAIN plus the flat nearest row for bypass, standalone FTS row ids and index-only filtering, exact custom/default RRF scores, exact differing normalized_scorevalues for both normalization methods, and invalid setter arguments.