How Can I use script field to retrieve the first 20 words around the search word for a string field ?
Suppose I have a field called Conent which is very lengthy . So If I am seraching sor “apple” in Content I should get atmost 20 words aroung the word apple .
How can I achieve this ?
Is fragment_size will do the trick ??
It looks like it highlights numbers from your range query. Try replacing the boolean query in the first “must” clause with this: