Score affected by term position for non-phrase queries

(vredens) #1


From the documentation I assumed that term position in any multi-term query
would also influence the score but I found out it is not so.

For example,

Given 2 documents like:
{ "text": "one two" }
{ "text": "two one" }

And a search like:
"query": {
"query_string": {
"query": "one~ two~",
"default_operator": "and"

This yields both documents, which is what I want, but they have the same
score, which is not what I'd like. Is there any way to have score
influenced by term position while keeping stuff like term fuzziness?

(system) #2