I have documents of various types that are extracted into text. Frequently, these documents contain text separated by newlines rather than into sentences if that makes sense. I would like to be able to receive my highlight snippets from elasticsearch such that each snippet does not cross a new line.
For example, suppose I have the document:
If I were to search for "Foo Bar" I would like that "Foo" and "Bar" be returned as separate snippets, given they are separated by newlines. However, instead I receive "Foo Bar" as a single snippet. Could anyone suggest to me what I might do?