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 5977 - [FT] Match Options and Positional Filters in FT expressions
Summary: [FT] Match Options and Positional Filters in FT expressions
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-19 19:03 UTC by Pat Case
Modified: 2011-01-06 12:43 UTC (History)
1 user (show)

See Also:


Attachments

Description Pat Case 2008-08-19 19:03:45 UTC
I would like the language document to state more clearly to which FT expressions match options and positional filters apply.

I propose the following language:

1) In 3.4 Match Options, after paragragh 5:
A match option applies to the FTWords expression that precedes it unless the match option is immediately preceded by an FTSelection enclosed in parentheses, then the match option applies to all the FTWords in the parenthecized FTSelection. 


2) In 3.6 Positional Filters, after paragraph 2:
A positional filter applies across any FTOr(s) or FTAnd(s) that precede it unless the positional filter is immediately preceded by an FTSelection enclosed in parentheses, then the positional filter applies to only the parenthecized FTSelection. 

Pat Case, Library of Congress
Comment 1 Michael Dyck 2008-08-19 20:32:50 UTC
(In reply to comment #0)
> I would like the language document to state more clearly to which FT
> expressions match options and positional filters apply.
> 
> I propose the following language:
> 
> 1) In 3.4 Match Options, after paragragh 5:
> A match option applies to the FTWords expression that precedes it unless
> the match option is immediately preceded by an FTSelection enclosed in
> parentheses, then the match option applies to all the FTWords in the
> parenthecized FTSelection. 

I think this would cause more problems than it would solve. For one thing,
it omits the possibility of a match option applied to an extension
selection. For another, whether a match option appended to a parenthesized
FTSelection applies to an FTWords contained therein depends on whether
an intervening match option overrides the outer one. (Moreover, if there's
an intervening Expr, we know that the outer match option definitely doesn't
apply.)

> 2) In 3.6 Positional Filters, after paragraph 2:
> A positional filter applies across any FTOr(s) or FTAnd(s) that precede
> it unless the positional filter is immediately preceded by an FTSelection
> enclosed in parentheses, then the positional filter applies to only the
> parenthecized FTSelection. 

This wording could be interpreted as saying that in a construct like:
    (fts1) ftor (fts2) FTPosFilter
the FTPosFilter only applies to (fts2), which is incorrect.

Gramatically, an FTPosFilter is appended to exactly one FTOr (which
consists of one or more FTAnds separated by the keyword "ftor"). It
filters the results of that FTOr (or the results of a preceding filter
applied to that FTOr, etc).
Comment 2 Pat Case 2008-10-06 19:15:23 UTC
Point 1 was rewritten during the 10/6 Full Text Task Force telecon:
An FTMatchOption applies to the FTPrimary that immediately precedes it. That FTPrimary is either an FTWords (possibly qualified by an FTTimes), an FTExtensionSelection, or a parenthesized FTSelection. 
--To be added in 3.4 before the definition of match option application order.

Point 2: A possible rewrite to address Michael D's objections for comment:
A positional filter applies to the FTOr that immediately precedes it. That FTOr may consist of no, one or more FTAnds and/or the results of a preceding filter applied to an embedded FTOr.

Pat
Comment 3 Pat Case 2008-10-30 17:02:33 UTC
 Point 2 was agreed to during the 10/30 Full Text Task Force F2F:
    An FTOr consists of one or more FTAnds (separated by "ftor"),
     each of which could be an FTPosFilter applied to an embedded FTOr,
     enclosed in parentheses.