You might want to take a look at the patch in
https://issues.apache.org/jira/browse/SOLR-4722 - 'Highlighter which
generates a list of query term position(s) for each item in a list of
documents, or returns null if highlighting is disabled.' I've used it  for
retrieving the term positions with no need for actual highlighting. The
patch is pretty old - I applied it to Solr 4.10 I think, so will probably
need some work for later releases.

HTH

-Simon

On Tue, Mar 28, 2017 at 4:59 AM, forest_soup <tanglin0...@gmail.com> wrote:

> Thanks Eric.
>
> Actually solr highlighting function does not meet my requirement. My
> requirement is not showing the highlighted words in snippets, but show them
> in the whole opening document. So I would like to get the term's
> position/offset info from solr. I went through the highlight feature, but
> found that exact info(position/offset) is not returned.
> If you know that info within highlighting feature, could you please point
> it
> out to me?
>
> The most promising way seems to be /tvrh and tv.offsets/tv.positions
> parameters. But I haven't tried it. Any comments on that one?
>
> Thanks!
>
>
>
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/Is-there-a-way-to-retrieve-the-a-term-s-
> position-offset-in-Solr-tp4326931p4327149.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to