This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6305 - [FT] distance filter question
Summary: [FT] distance filter question
Status: CLOSED WORKSFORME
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://www.w3.org/TR/xpath-full-text-10
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 10:45 UTC by Petr Pleshachkov
Modified: 2011-01-06 15:46 UTC (History)
1 user (show)

See Also:


Attachments

Description Petr Pleshachkov 2008-12-12 10:45:05 UTC
Dear authors,

I have a question about the following queries:

(<p>cat dog bird</p>)[. ftcontains "cat dog" distance at least 2 words]
As I understood from the spec it should return true, because "cat fog" returns only one StringInclude. Right ? 

This query should return true as well. Right ? 
(<p>cat dog bird</p>)[. ftcontains {"cat", "dog"} phrase distance at least 2 words]
Comment 1 Michael Dyck 2008-12-12 19:47:40 UTC
[personal response]

> (<p>cat dog bird</p>)[. ftcontains "cat dog" distance at least 2 words]
> As I understood from the spec it should return true, because "cat fog" returns
> only one StringInclude. Right ?

(Presumably, for "fog", you meant "dog".) Yes, I believe it returns true. The search context is searched for a single phrase, so the distance filter is basically superfluous. (If you changed the FTPrimary to
    "cat dog" any word
or
    "cat dog" all words
then a distance filter would have some effect.)


> This query should return true as well. Right ? 
> (<p>cat dog bird</p>)[. ftcontains {"cat", "dog"} phrase distance at least 2
> words]

Yes, I believe so.

Comment 2 Michael Dyck 2009-01-08 02:46:01 UTC
At its meeting on 2008-12-22, the Task Force agreed with my response in
comment #1.

I believe this resolves this issue. Bugzilla doesn't really have a
resolution appropriate to "You asked a question and got an answer.",
so, somewhat arbitrarily, I'm picking WORKSFORME.

If you accept this resolution, please mark the issue CLOSED.