1 and 2 are matched because the slop is 1, so I'm allowing one token between 'foo' and 'bar'.
I'm expecting 3 and 4 not to match, because there are more than one token between 'foo' and 'bar'.
What I'm missing?
How to make it work as I intended?
Returns documents based on a provided query string, using a parser with a strict syntax.
This query uses a syntax to parse and split the provided query string based on operators, such as AND or NOT. The query then analyzes each split text independently before returning matching documents.
phrase_slop
(Optional, integer) Maximum number of positions allowed between matching tokens for phrases.
Defaults to 0. If 0, exact phrase matches are required. Transposed terms have a slop of 2.
And I'd like to make it work in 'query_string'.
I've tried to work with 'match_phrase' query and the 'slop' parameter works perfectly. The thing is that I also want to use logic operators, especially NOT in my query, and I'm not sure if it's possible in 'match_phrase' query.
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.