You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ilya Zavorin <iz...@caci.com> on 2012/03/19 21:41:00 UTC

is there an efficient way of finding locations of highlighted fragments in original text?

Hi,

Is there an efficient way to find where a highlighted fragment is located in the original text stream? Of course, I can first find a fragment using Highlighter.getBestFragments() and then search for the fragment (without the "<B>"s) using Java's substring search. But is there a way to do it faster using Lucene's core or Highlighter machinery?

Thanks

Ilya Zavorin