Open asfimport opened 3 years ago
Alan Woodward (@romseygeek) (migrated from JIRA)
Given that Passage#getLength() is only called by PassageScorer for use as a norm we could just modify the return value here if we think that this sort of weighting will always be useful.
The UnifiedHighlighter scores its highlighted passages using a modified term frequency calculation, similar to BM25. This means that two passages containing the same set of terms will score equivalently. Given that proximity is often a reasonable proxy for relevance, and that passages contain the offsets of their internal hits, it would be useful to add the option of also weighting by the difference between the start of the first hit and the end of the last within the passage.
Migrated from LUCENE-10011 by Alan Woodward (@romseygeek)