Document WholeFragmenter Term Highlighting Behavior

Issue #216 resolved
Andrew T
created an issue

When using a WholeFragmenter to perform highlighting, any text that has none of the search terms in it causes the highlighter to return nothing when highlighting.

I'm pretty sure this isn't a bug but it caused me a bit of a headache since I previously used Sphinx highlighting to highlight whole text and it would always return all the text passed - whether or not the terms were found in it.

I thought it might be useful to document this behavior for others so they don't sit there wondering why the WholeFragmenter highlighter doesn't do anything some times..

Comments (1)

  1. Matt Chaput repo owner

    Added minscore keyword argument to Hit.highlights() method. Fixed fragment scoring logic to be >= minscore instead of > minscore. Removed short-circuit in highlight method when no terms matched. Added note to WholeFragmenter docs about always returning the fragment. Fixes issue #216.

    → <<cset 55f9c484047a>>

  2. Log in to comment