[KinoSearch] Highlighter Bug

Ashley Pond V ashley.pond.v at gmail.com
Wed Nov 17 15:17:42 PST 2010


Just throwing this out there since it's on point though I have NO
sample/test code. In highlighting I was doing I was seeing results
like so

bla <strong>bla</strong> bla bla bla bla bla bla bla bla bla bla bla
bla bla bla bla bla
   bla.<strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong>

I strongly, snerk, suspect your fix will also address that. Sorry I
never got around to reporting it. The empty tags were harmless in HTML
and I never got time to work up a test, etc. {shame on me}

-ashdlajfey

On Wed, Nov 17, 2010 at 3:13 PM, Marvin Humphrey <marvin at rectangular.com> wrote:
>> > I had a closer look and the error case is that you have three sentences
>> > where only the first and the last contain keywords but the middle one is
>> > chosen for the excerpt.
>
> Found the bug.  S_has_heat() expects a length but was being passed an offset.
>
> As a result, S_has_heat() was approving an excerpt -- because the excerpt had
> "heat", meaning a warm spot in the HeatMap -- but the warm spot actually lay
> outside the excerpt's boundaries.  Thus an excerpt which should have been
> rejected was being approved.  Or, to be precise, the truncation of the excerpt
> to end on a particular sentence boundary was approved when it should not have
> been.
>
> Before:
>
>    bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
>    bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
>    bla.<strong></strong>
>
> After (the &#8230; is a Unicode ellipsis):
>
>    bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
>    bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla.  bla
>    bla bla <strong>MMM</strong> bla bla bla bla bla bla bla bla bla
>    bla&#8230;
>
> I've committed the fix as r6485 to the KinoSearch repository.  It would be
> nice to augment that with the test case you provided and commit to Lucy as
> well.
>
> Cheers,
>
> Marvin Humphrey
>
>
> _______________________________________________
> kinosearch mailing list
> kinosearch at rectangular.com
> http://rectangular.com/cgi-bin/mailman/listinfo/kinosearch
>



More information about the kinosearch mailing list