Skip to main content

apply_query_boost

Function apply_query_boost 

Source
pub fn apply_query_boost(
    combined_scores: &HashMap<usize, f32>,
    query: &str,
    all_chunks: &[CodeChunk],
) -> HashMap<usize, f32>
Expand description

Apply query-type boosts to candidate scores.

Mirrors apply_query_boost. Returns a new map; the input is not mutated. Empty input passes through.

Branches on is_symbol_query:

  • Symbol-shaped query → [boost_symbol_definitions] (×3 base, ×1.5 on stem match) and scan non-candidate stem-matched chunks.
  • NL query → [boost_stem_matches] (file-stem keyword overlap) + [boost_embedded_symbols] (half-strength CamelCase scan).