Skip to main content

Module reranker

Module reranker 

Source
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§

RerankDocument
A document for reranking: pairs a document ID with its text content.
RerankScore
A reranking score for a single document.
RerankerInfo
Metadata about a reranker for display and logging.

Enums§

RerankerError
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§

RerankerResult
Convenience alias used throughout the frankensearch crate hierarchy.