Function: applyMainFacetPreference()
applyMainFacetPreference(
results,topN,damping?):SearchCandidate[]
Defined in: Services/Search/ScoringUtils.ts:71
Apply main-facet preference scoring with configurable damping.
Groups candidates by verse and blends main vs sub facet scores. Sub-facets are terse 3-5 word phrases — great for exact matches but can mislead on multi-concept queries. Strategy: for each verse, use max(mainScore, subScore * damping). When a sub-facet is genuinely strong (above the damping threshold vs main), it still wins.
Parameters
results
Scored candidates, sorted by score descending
topN
number
Maximum results to return
damping?
number = DEFAULT_SUB_FACET_DAMPING
Sub-facet score multiplier (default: 0.92)
Returns
Re-ranked candidates