Indexing and querying large text documents with multiple term occurences

Hi,

I am indexing books and some long web pages in ElasticSearch. My ElasticSearch documents have a field 'content' that is extremely long with multiple occurrences of my search terms. Using the highlight tool of Elastic, is it possible to show the multiple occurences of a match within the same document?

Ex: seeing the phrase: "Quick brown fox" on pages 1,13,53, 102 of the same document, ES will return snippets of all those occurences?

Is there a better way to do this?

Thanks!

For book-size texts I'd be tempted to break it into multiple elasticsearch documents and search those.
They can be grouped back into books in various ways at query-time but it will certainly help with highlighting to have smaller docs.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.