Coverage for src/qdrant_loader_mcp_server/search/hybrid/orchestration/planner.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-08 06:06 +0000

1from __future__ import annotations 

2 

3from dataclasses import dataclass 

4 

5 

6@dataclass(frozen=True) 

7class HybridPlan: 

8 use_pipeline: bool 

9 expanded_query: str | None 

10 

11 

12class QueryPlanner: 

13 """Decide how to execute a hybrid search request. 

14 

15 Current behavior mirrors legacy: prefer pipeline when available. 

16 """ 

17 

18 def make_plan(self, has_pipeline: bool, expanded_query: str | None) -> HybridPlan: 

19 return HybridPlan( 

20 use_pipeline=bool(has_pipeline), expanded_query=expanded_query 

21 )