How to fetch the offset of the highlighted word in the Elastic search result

I have indexed a book contents to Elastic search. Now from the search
results I need to navigate to the page of the book. I am looking to fetch
the offset of the search word in the results and map to the offset in the
book to get the page number.

I have seen similar question in this forum, but they have no solution in
it. I know it is easy to get it in LUCENE. I tried with TermVector in
mapping, but it does not give me the offset in the query result.

I have spend good time in elastic search documentation and other forums to
get the offsets of the highlighted search results, but I didnot get the
solution.

Any suggestions please.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/cbfd8edd-03eb-43dd-94a5-2fbe28edc0fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.