search_with_structured_patterns

Function search_with_structured_patterns 

Source
pub fn search_with_structured_patterns(
    root_path_str: &Path,
    _plan: &QueryPlan,
    patterns: &[(String, HashSet<usize>)],
    custom_ignores: &[String],
    allow_tests: bool,
    language: Option<&str>,
) -> Result<HashMap<PathBuf, HashMap<usize, HashSet<usize>>>>
Expand description

Helper function to search files using structured patterns from a QueryPlan. This function uses a RegexSet approach for deterministic pattern matching and collects matches by term indices. It uses the file_list_cache to get a filtered list of files respecting ignore patterns.

ยงArguments

  • root_path - The base path to search in
  • plan - The parsed query plan
  • patterns - The generated regex patterns with their term indices
  • custom_ignores - Custom ignore patterns
  • allow_tests - Whether to include test files