One could come up with different should clauses and different slops for boosint,g but that does not really sound efficient.
Can you share a little more about your use-case and maybe an example where this kind of search makes sense for the user. Maybe there are other possibilities.
What I want to do is choosing whether proximity boosts score or in-order option boosts score.
Example)
Query: apple banana carrot
Doc 1: I bought apple, watermelon, kiwi, orange and banana.
Doc 2: I saw banana, but bought apple.
In above case, when user search by example query in option of operator 'OR',
based on other ES DSL doc 2 would get higher score, because token 'banana' and 'apple' are closer. But I want to doc 1 to get higher because token 'banana' and 'apple' are in order.
Is it possible to create in-order query with operator 'OR'?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.