Reputation: 1001
We are using Spring Data Open Search and getting results back from our query, the SearchHits SearchHit object has highlightedFields which is a map of fields and values. The value will be a String that has text that includes some text before and after matches of text searching on. We want to be able to configure it so that we tell Open Search how much text should be in the value, length wise. right now it seems for some of our results that matching text shows, but before and after that text is sparse and therefore missing more context we can give the user. Our boss wants at least 20 words before and after the matching text string (as long as the field itself has that much text in it) and in the case of some 50 page word documents there are plenty or words before and after the matching text, but we are not getting much back.
Upvotes: 0
Views: 31