search_code_enhanced
Search across structurally related code files when initial results hint the answer spans multiple components, returning ranked chunks in a single query.
Instructions
Use when search_code results suggest the answer spans multiple structurally-related files (e.g. handler/publisher/consumer triads, or a class and its subclasses) and you want to pull in chunks from those neighbor files in one shot. Same inputs and filters as search_code; does a second-pass Milvus search filtered to neighbor file paths before reranking. Results carry per-chunk citation fields and a top-level sources map (commit_sha + permalink_base). Set check_staleness=true to add an is_stale flag per source (does live git HEAD resolution — slightly slower). response_mode (opt-in, default 'full'): 'facet' returns ranked metadata + a one-line header per hit with NO code body (then fetch ranges with read_file); 'summary_tail' keeps the top-2 snippets and replaces lower-ranked bodies with their indexed summary. Returns compact markdown by default (~20% fewer tokens); pass response_format='json' to get the structured dict instead (for programmatic callers).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| language | No | ||
| use_hyde | No | ||
| source_id | No | ||
| cross_repo | No | ||
| use_hybrid | No | ||
| path_prefix | No | ||
| rerank_pool | No | ||
| adaptive_topk | No | ||
| response_mode | No | full | |
| strip_imports | No | ||
| check_staleness | No | ||
| response_format | No | markdown | |
| adaptive_topk_gap | No | ||
| use_graph_scoring | No | ||
| use_summary_vector | No | ||
| query_class_payload | No | ||
| include_community_summaries | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |