I am working in a project where I need to provide boost based on Proximity in Elasticsearch. The Requirement states that let's say we have a field called statement in index so doc 1 has following value in statement
"statement":["this is a dog",
"it is brown in colour"
"it is very fluffy"]
and doc 2 has statement as :-
"statement":["this is a brown fluffy dog",
"it plays in the garden"]
Let's say I do a query of "beautifull fluffy dog" then the result I am getting is both doc 1 and 2 with both having same relevance. But what I have to achieve is the doc 2 should come with higher relevance than doc 1 because in doc 2 the first statement is having fluffy and dog is same sentence, whereas in doc 1 its scattered over the values of statement. I am using phrase query with slop as 10 and have "position_increment_gap"as 100 in mapping. Using ES version 2.3.0