I'm trying to use ElasticSearch to locate important text which I then run a second process to extract information from the highlighted fragment.
The problem is that in these highlighted fragments, the text I need to extract is often after the word that I'm searching for. Eg. In the document - "Numbers: 1 2 3 Colours: red green blue", I'm searching for "colours". The result I see is "3 Colours"
With ElasticSearch it seems like the fragment often finishes after "colours".
I have tried modifying the fragment size and it only increases the text BEFORE my search term and none after it.
Is there a way to make sure that "colour" would be in the middle of the fragment?