This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
in http://www.w3.org/TR/xpath-full-text-10/#ftdistance, we have 2nd example: The following expression returns false: /books/book ftcontains "web" ftand "site" ftand "usability" distance at most 2 words The search context does contain the phrase "The usability of a Web site", in which the tokens "usability" and "Web" have a distance of 2 words, and the tokens "Web" and "site" have a distance of 0 words, both of which satisfy the constraint distance at most 2 words. However, the problem is that "usability" and "site" have a distance of 3 words, which does not satisfy the constraint, and so the distance selection yields no matches, and the expression as a whole yields false. (The phrase "Improving Web Site Usability" would satisfy the given full-text selection, but it occurs in an attribute value, and so is not subject to tokenization.) This means the distance is applied to every pair of matching tokens. However, in http://www.w3.org/TR/xpath-full-text-10/#tq-ft-fs-FTDistance, the formal semantic xquery defintion, it applies distance predicate on matching token sorted by their token postion. Therefore, they are not compared in pairwise manner. For the above example, only "usability" and "web" are compared ; "web" and "site" are compared, but "usability" and "site" are NOT compared, then the expression in the example shall return true instead of false.
I have changed the prose around that example to agree with the meeting 170 decision re the application of distance filter to n>2 matches.
... so I'm marking the bug as resolved-FIXED.