[KinoSearch] Highlighter Bug
marvin at rectangular.com
Tue Nov 16 15:52:39 PST 2010
On Tue, Nov 16, 2010 at 05:15:42PM +0100, Nick Wellnhofer wrote:
> I found a bug in the highlighter in KinoSearch 0.30_121 and 0.31. For
> some searches the excerpt doesn't contain any of the search terms, but
> only a sentence following the one that looks like it should have been
> I had a quick look at the code in
> core/KinoSearch/Highlight/Highlighter.c and the test "candidate >= top"
> in Highlighter_raw_excerpt looks fishy to me. AFAICS this might cause
> sentences to be skipped.
You're probably right that that's where we're skipping ahead, but it's not
clear what aspect of the input is causing Raw_Excerpt() to malfunction. The
check inside that block is supposed to verify that the chosen excerpt contains
at least some relevant material -- that's what the S_has_heat() call is there
This will be hard to debug without sample material. Once we have a document
which triggers the bad behavior, we can start throwing in debugging printf's.
If you can supply me with sample code which has the problem, I'll have a good
More information about the kinosearch