Function: expandTopics()
expandTopics<
T>(input,scoring?,options?):T[]
Defined in: Services/Search/TopicExpansion.ts:95
Expand topic results into verse lists and merge with non-topic results.
Algorithm:
- Filter topics below topicMinScore threshold
- For each topic, compute verse scores with damping and boost
- Apply leapfrog cap: topic verse scores cannot exceed best non-topic score
- Merge + dedup by verseId (keep highest score)
- Apply intersection bonus if enabled
Type Parameters
T
T extends ExpandableResult
Parameters
input
Pre-fetched topic data and non-topic results
scoring?
Scoring config (topicDamping, topicBoost, topicMinScore, facetScoring)
options?
Expansion behavior options
Returns
T[]
Merged results sorted by score descending