lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
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

http://blog.mikemccandless.com


On Mon, Aug 12, 2013 at 1:20 PM, Lingviston
<vladislav.ermolin@outlook.com> 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: http://lucene.472066.n3.nabble.com/How-to-get-hits-coordinates-in-Lucene-4-4-0-tp4083913p4084046.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message