Re: [FT] ApplyFTScopeDifferentSentence semantics wrong?

Hmmm.... I just found this:

	http://www.w3.org/Bugs/Public/show_bug.cgi?id=9448

which seems to address the problem.

- Paul


On Dec 16, 2010, at 9:58 PM, Paul J. Lucas wrote:

> 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 06:09:00 UTC