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:
@@ -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 },
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user