Expand description
Reranker trait and types for cross-encoder reranking.
This module re-exports the canonical Reranker trait from frankensearch’s
SyncRerank trait. All reranking implementations
must satisfy Reranker, which provides a synchronous reranking interface
suitable for cass’s sync call sites.
The SyncRerankerAdapter can wrap any
Reranker implementor into frankensearch’s async Reranker trait when needed
for the frankensearch search pipeline.
§Implementations
- FastEmbed Reranker: Uses ms-marco-MiniLM-L-6-v2 cross-encoder via FastEmbed. Requires model download with user consent.
Structs§
- Rerank
Document - A document for reranking: pairs a document ID with its text content.
- Rerank
Score - A reranking score for a single document.
- Reranker
Info - Metadata about a reranker for display and logging.
Enums§
- Reranker
Error - Unified error type covering all failure modes across the frankensearch search pipeline.
Traits§
- Reranker
- Synchronous reranking interface for host projects that call rerankers from non-async contexts.
Functions§
- rerank_
texts - Convenience function to rerank raw text documents.
Type Aliases§
- Reranker
Result - Convenience alias used throughout the frankensearch crate hierarchy.