Ahhh....the reason the second Shapes is not highlighted is that the Highlighter highlights based on what caused the hit in Lucene...and Lucene does not look for every shape within 4 paragraphs of distribution...after it finds one such occurrence it says "sweet, a match" and moves on...it does not look for another such match. If there where another occurrence of distribution on the other side of the last Shapes, then it would cause its own match. This may be because of how I have implemented my WithinSpanQuery or it may be how Span queries in lucene work in general. I will investigate and let you know. I am thinking that Lucene just quits after finding the span its looking for...it says ok I found distribution, now find shape within 4 paragraphs after distribution...okay found it...I don't think it then says ok...is there another shape after that shape within 4...and then another and another?

Ill look into it further. Certainly though , other than this possible oddity...everything is working.

- Mark

Dave Golombek wrote:
I was wondering if people thought that making
Highlighter.mergeContiguousFragments() public (and non-final) would be
acceptable. In my application, I want to strip all fragments with score == 0
before merging the fragments (to get the minimal matching section, but still
in order), and the easiest way to do so would be to override that method.
Not a big deal, but I thought other people might find it useful. Making the
method public static would also achieve the same result, allowing me to call
the function separately.

Thanks,
Dave Golombek
Black Duck Software, Inc.
http://www.blackducksoftware.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to