feat: support vector-only and FTS-only reranking (#3024)

Add rerank_vector() and rerank_fts() methods to Reranker trait, allowing
rerankers to work with single search modes instead of only hybrid
search.

Implemented for:
- RRFReranker (Rust and Python)
- LinearCombinationReranker (Python)

Resolves TODO at rust/lancedb/src/rerankers.rs:55

Changes:
- Extended Reranker trait with default implementations
- Added unit tests for new methods
- Updated documentation with examples

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
KeeProMise
2026-12-01 17:07:02 +08:00
committed by GitHub
co-authored by Xuanwo
parent 22ed284031
commit a85cb92ffd
19 changed files with 1404 additions and 131 deletions
+2
View File
@@ -668,6 +668,8 @@ distance between the query vector and the actual uncompressed vector.
rerank(reranker): VectorQuery
```
Apply a reranker to this vector or hybrid query.
#### Parameters
* **reranker**: [`Reranker`](../namespaces/rerankers/interfaces/Reranker.md)