lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: How to get hits coordinates in Lucene 4.4.0
Date Tue, 13 Aug 2013 10:55:56 GMT
If you use PostingsHighlighter, then Passage.getMatchStarts/Ends gives
you the offsets of each match.  You'd need a custom PassageFormatter
that takes these ints and saves them somewhere; or possibly the patch
on LUCENE-4906 (allowing you to return custom objects, not just
String) from your highlighter.

I'm less familiar with the older highlighters but likely it's possible
to get the absolute offsets from them as well.

Mike McCandless

On Mon, Aug 12, 2013 at 1:20 PM, Lingviston
<> wrote:
> I think that's OK for me. I just need to know the right way to get them.
> Notice that queries must support boolean operators, *, ? and qoutes.
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message