W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2011

[Bug 12009] New: [XQFTTS] FTNot-q6

From: <bugzilla@jessica.w3.org>
Date: Tue, 08 Feb 2011 10:25:31 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-12009-523@http.www.w3.org/Bugs/Public/>

           Summary: [XQFTTS] FTNot-q6
           Product: XPath / XQuery / XSLT
           Version: Proposed Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Full Text 1.0
        AssignedTo: jim.melton@acm.org
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

Our implementation disagrees with the expected (empty sequence) result for test

(: FTNot-q6: violates negation restriction 2: FTST0002 possible :)

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

(: nothing :)
$input-context/books/book[para contains text "software" ftand ("coder" ftand
"ninja" window 5 words)]/title

Consider the paragraph:

   <para>Amazingly enough, many people believe that nunchuks are not useful
    to software development! They prefer usability studies to the swift
    application of physical means of persuasion. Hah! The ninja coder knows

and the predicate

para contains text "software" ftand ("coder" ftand ftnot "ninja" window 5 words

Indexing word positions at 1, 'ninja' is at position 29 (a StringExclude) and
'coder' is at 30 (a StringInclude).

Using the function fts:ApplyFTWordWindow  at 


n = 5
minpos = 30
maxpos = 30
windowStartPos ranges from 26 to 30 (inclusive)

When windowStartPos is 30, windowEndPos is 34.


         for $stringExclude in $match/fts:stringExclude
            where $stringExclude/fts:tokenInfo/@startPos >=
              and $stringExclude/fts:tokenInfo/@endPos <=
            return $stringExclude

returns the empty sequence, because 

$stringExclude/fts:tokenInfo/@startPos = 29 which is less than the
windowStartPos, thus there exists a window starting at the word 'coder' which
doesn't include 'ninja'.  The match contains no stringExcludes so gives the
query a result of <title>Ninja Coder</title>.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 8 February 2011 10:25:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:34 UTC