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 11209 - [FT] Wildcard and thesaurus options in combination
Summary: [FT] Wildcard and thesaurus options in combination
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 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: 2010-11-03 15:57 UTC by Tim Mills
Modified: 2010-11-30 05:37 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2010-11-03 15:57:30 UTC
Suppose an implementation's default thesaurus expands each of the tokens "three" and "3.0" to the two query items "three" and "3.0".

Consider queries such as:

"version 3.0" contains text "three" 
using wildcards 
using default thesaurus

and

"version three" contains text "3.0" 
using wildcards 
using default thesaurus

It seems that thesaurus expansion can occur even when the wildcard option is enabled.  However, in:

 fts:lookupThesaurus( $queryTokens,
                           $matchOption/fts:thesaurusName,
                           $matchOption/@language,
                           $matchOption/fts:relationship,
                           $matchOption/fts:range )

it appears that the thesaurus won't know whether characters in the query tokens should be interpreted as wildcards or not.  Also the thesaurus might need to escape its results ("three" expanding to "3\.0") to avoid triggering wildcard matching.
Comment 1 Michael Dyck 2010-11-30 05:36:43 UTC
At their joint 2010-11-23 meeting, the XQuery/XSL WGs approved the following fix:

   -- In 4.2.5.2, have fts:applyQueryTokensAsPhrase() pass
      $noThesaurusOptions to fts:applyThesaurusOption().

   -- In 4.2.5.7, have fts:applyThesaurusOption() accept
      $noThesaurusOptions and pass it on to fts:lookupThesaurus().

   -- In 4.2.5.3, have fts:lookupThesaurus() [an external
      (implementation-defined) function] accept $noThesaurusOptions,
      and in the prose, say something to the effect that by giving it
      access to the other match options, we allow the implementation to
      apply any of those match options (whichever it deems relevant) to
      the input or output of the "actual" thesaurus lookup.

(They also approved the subsequent cleanup of eliminating the now-redundant $thesaurusLanguage parameter from fts:lookupThesaurus(), and the now-unnecessary "language" attribute from complexType ftThesaurusOption.)

I have made these changes to the editors' draft of the Full Text spec, and so am marking this issue resolved-FIXED. Since you were at the meeting and indicated that these changes would be satisfactory, I will also mark the issue CLOSED.