W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2010

[FT] ApplyFTScopeDifferentSentence semantics wrong?

From: Paul J. Lucas <paul@lucasmail.org>
Date: Thu, 16 Dec 2010 21:58:59 -0800
Message-Id: <DDF17AC8-2685-490A-9D7F-82FD01DC27A0@lucasmail.org>
To: public-qt-comments@w3.org
Given this query:

> let $x :=
>   <p>
>     It was the best of times, it was the worst of times.
>     It was the age of wisdom, it was the age of foolishness.
>   </p>
> return $x contains text "best" ftand "wisdom"
> different sentence

the result should intuitively be true.  However, if I copy & paste the XQuery code for ApplyFTScopeDifferentSentence() given in the Full Text specification section and combine it with the following data:

> let $allMatches :=
>   <fts:allMatches stokenNum="1">
>     <fts:match>
>       <fts:stringInclude queryPos="1" isContiguous="T">
>         <fts:tokenInfo startPos="3" endPos="3" startSent="1" endSent="1"
>           startPara="1" endPara="1"/>
>       </fts:stringInclude>
>       <fts:stringInclude queryPos="2" isContiguous="T">
>         <fts:tokenInfo startPos="17" endPos="17" startSent="2" endSent="2"
>           startPara="1" endPara="1"/>
>       </fts:stringInclude>
>     </fts:match>
>   </fts:allMatches>
> return
>   fts:ApplyFTScopeDifferentSentence( $allMatches )

I get an empty <fts:allMatches/> result.  That seems wrong.

I would think the semantics would have to be modified so as not compare a $stringInclude against itself since can never be not equal to itself, i.e., not different from itself.


- Paul

P.S.: The same is true for ApplyFTScopeDifferentParagraph().
Received on Friday, 17 December 2010 05:59:38 UTC

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