https://lucene.apache.org/core/8_0_0/core/org/apache/lucene/search/PhraseQuery.html#getSlop--, writes the following:
For instance, when searching for "quick fox", it is expected that the difference between the positions of fox and quick is 1. So "a quick brown fox" would be at an edit distance of 1 since the difference of the positions of fox and quick is 2. Similarly, "the fox is quick" would be at an edit distance of 3 since the difference of the positions of fox and quick is -2. The slop defines the maximum edit distance for a document to match. It is exact but not clear: "quick fox" hits "the fox is quick" with a slop 3 if "is" is not a stop word, if "is" is in the list of stop words of the analyzer, a slop 2 is enough. claudelep...@gmail.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>