Coverage for src/qdrant_loader_mcp_server/search/hybrid/interfaces.py: 100%
7 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-08 06:06 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-08 06:06 +0000
1from __future__ import annotations
3from typing import Protocol
5from ..components.search_result_models import HybridSearchResult
8class VectorSearcher(Protocol):
9 async def search(
10 self, query: str, limit: int, project_ids: list[str] | None
11 ) -> list[dict]: ...
14class KeywordSearcher(Protocol):
15 async def search(
16 self, query: str, limit: int, project_ids: list[str] | None
17 ) -> list[dict]: ...
20class ResultCombinerLike(Protocol):
21 async def combine_results(
22 self,
23 vector_results: list[dict],
24 keyword_results: list[dict],
25 query_context: dict,
26 limit: int,
27 source_types: list[str] | None,
28 project_ids: list[str] | None,
29 ) -> list[HybridSearchResult]: ...
32class Reranker(Protocol):
33 def rerank(self, results: list[HybridSearchResult]) -> list[HybridSearchResult]: ...