pub fn merge_ranked_blocks(
results: Vec<SearchResult>,
threshold: Option<usize>,
) -> Vec<SearchResult>Expand description
Merges ranked search results that are adjacent or overlapping
This function should be called AFTER ranking and limiting to merge blocks that come from the same file and are adjacent or overlapping.
§Arguments
results- A vector of already ranked and limited SearchResult objectsthreshold- Maximum number of lines between blocks to consider them adjacent (default: 5)
§Returns
A new vector of SearchResult objects with adjacent blocks merged