[FT] ApplyFTScopeDifferentSentence semantics wrong?

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 4.2.6.6 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.

Right?

- Paul

P.S.: The same is true for ApplyFTScopeDifferentParagraph().

Received on Friday, 17 December 2010 05:59:38 UTC