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 12010 - [XQFTTS] ftmatchoptions-q1
Summary: [XQFTTS] ftmatchoptions-q1
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 (show other bugs)
Version: Proposed Recommendation
Hardware: PC Windows NT
: 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: 2011-02-08 12:05 UTC by Tim Mills
Modified: 2011-03-15 15:49 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2011-02-08 12:05:07 UTC
This query uses thesaurus expansion for a term not contained in the thesaurus.

Since the definition of fts:applyThesaurusOption shows that thesaurus expansion replaces (rather than augments) the query items, it isn;'t specified whether a thesaurus expansion should always include a query item formed from the original query item tokens (neither from the specification nor the guidelines for running the test suite).  However, it is implicit from the expected results of the query that, at least in the case of a term not in the thesaurus, such a token should be returned.

239/685] (234/5) ftmatchoptions-q1
(: insert-start :)
declare variable $input-context external;
(: insert-end :)

$input-context/books/book[
    .//content contains text "Resume" using stemming using stop words at "http:/
/bstore1.example.com/StopWordList.xml" using diacritics sensitive using case sen
sitive using language "de" using thesaurus at "http://bstore1.example.com/Usabil
ityThesaurus.xml"
]
Comment 1 Tim Mills 2011-02-24 16:13:12 UTC
In this example, no number of levels is specified, so following the specification

"The default is to query all levels in hierarchical relationships or to query an implementation-defined number of levels in hierarchical relationships."

this is equivalent to

using thesaurus at "http://bstore1.example.com/UsabilityThesaurus.xml"
at least 0 levels

Bug 12036 proposes that expansion of any term by at least 0 levels will always include the original term.
Comment 2 Tim Mills 2011-03-15 15:40:05 UTC
ACTION A-467-04, ACTION A-468-03

Using test suite thesauri

XQuery and XPath Full Text 1.0 leaves as implementation-defined the way in which the hierarchical relationships are queried.  The following explanation gives an description of how to use the test suite thesauri in a way consistent with the expected results of tests which use a thesuarus.  

Expansion of an item T exactly 0 times using relationship R turns the item unchanged.  

* For example, expansion of 'duties' exactly 0 times using relationship "UF" returns 'duties'
* For example, expansion of 'cheese' exactly 0 times using relationship "UF" returns 'cheese'

Expansion of an item T exactly 1 time using relationship R returns the item to which the item U if T is directly related to U by relationship R, or the empty sequence (i.e. no query items) if T is not directly related by R to any other term.  For example using the thesaurus in 'usability.xml'.

* For example, expansion of 'duties' exactly 1 time using relationship "UF" returns 'duty'
* For example, expansion of 'cheese' exactly 1 time using relationship "UF" returns the empty sequence

Expansion of an item T exactly N times, where N is greater than 1 proceeds by expanding exactly 1 time the result of exapnding item T exactly N - 1 times.

Expansion of an item T exactly N times, where N is less than zero using relationship R turns the empty sequence.

* For example, expansion of 'infrastructure' exactly 2 times using relationship "UF" returns 'Web'
* For example, expansion of 'duties' exactly 2 times using relationship "UF" returns the empty sequence

Expansion of an item T between N and M times, where M is greater than or equal to N, returns the union of items returned from expansion of item T exactly P times for P between N and M.

Expansion of an item T at most N times, where N is greater than or equal to 0, returns the result of expanding T between 0 and N times.

Expansion of an item T at least N times, where N is greater than or equal to 0, returns the result of expanding T between N and infinity times.  That is, expansion continues until the set of items in the expansion does not change.
Comment 3 Tim Mills 2011-03-15 15:49:08 UTC
In the following text "expansion of an item T using relationship R" means the application of the fts:lookupThesaurus to the query tokens of query item T.