The proximity search is not a boolean operator so the priority does not apply to this part of the query. Can you provide us with an example of query where the priority is not clear for you ?
Hi,
Thanks for your answer.
I don't have a specific example. I was making a comparison between KQL that engines like FAST use, and Elasticsearch.
For KQL I found this: https://msdn.microsoft.com/en-us/library/hh658228(v=office.12).aspx
As you can see, it prioritize all operators: boolean and non-boolean.
So, I though Elasticsearch will have something similar.
Yes this is because they have an operator named NEAR. For the query_string we don't have a NEAR operator but you can use the slop parameter of the phrase query:
"fox quick"~5 AND brown
In such case the proximity operator is not ambiguous, it should apply to the phrase query only as a filter. With an operator like NEAR, the ambiguity is resolved by the priority of the operators like in:
fox NEAR quick AND brown
Since the query_string query does not implement such operator we don't need priority.
Hi,
One more question:
can I write one of the following queries: “fox quick or brown”~4, or “fox (quick or brown)”~4
so the "or" is calculated before the "proximity"?
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.