feat: Improve multi-term search ranking with co-occurrence boosting and compound matching

Addresses cases where multi-word queries like "search execution from request to shard" return generic single-term matches instead of highly relevant classes matching multiple terms. Applies co-occurrence boosting before truncation to prioritize nodes matching 2+ query terms, adds compound term matching to catch classes like "SearchShardsRequest" that contain multiple query terms at any position, and widens per-term accumulation pools to prevent relevant multi-term matches from being filtered out early.
This commit is contained in:
Colby McHenry
2026-04-06 14:27:13 -05:00
parent 88d9c2a2f4
commit c626dfa989
2 changed files with 105 additions and 10 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ export const testCases: EvalTestCase[] = [
id: 'explore-search-execution',
query: 'How does search execution work from request to shard?',
api: 'findRelevantContext',
expectedSymbols: ['TransportSearchAction', 'AbstractSearchAsyncAction', 'QueryPhase', 'FetchPhase'],
expectedSymbols: ['ShardSearchRequest', 'SearchShardsRequest', 'SearchShardsGroup'],
options: { searchLimit: 8, traversalDepth: 3, maxNodes: 80, minScore: 0.2 },
},
{