Related note:
The patch uses the local isInWindow method rather than Distance.noTimes method
Either implementation should be valid, but each will be faster in different use cases.
isInWindow will be faster for long documents when the query terms appear only rarely. (Complexity: |Q| . window . occurences(Q,d))
Distance.noTimes will be faster when the query terms appear often in a document. (Complexity: |Q| . documentLength-window)
Current implementation passes all of the unit tests. Resolving this issue.
Query language documentation should be updated to describe what this functionality does and how it differs from proximity score modifiers.