[Bug 12144] [FT] ApplyFT*Window semantics wrong

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

Michael Dyck <jmdyck@ibiblio.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdyck@ibiblio.org

--- Comment #2 from Michael Dyck <jmdyck@ibiblio.org> 2011-02-21 08:01:59 UTC ---
(personal response:)
This is mostly a duplicate of Bug 12009, so I will mark it as such, but I'll
also answer some particulars.

As indicated in 12009, I believe your engine is behaving conformantly on this
test-case; the test-case's expected output is incorrect.

Re the whittled-down test:
> let $x := <msg>ninja coder</msg>
> return $x contains text "coder" ftand ftnot "ninja" window 5 words

I believe your engine, by returning true, is again correct, and your
interpretation of a window filter used with an "ftand ftnot" is incorrect.

> If the "ftnot" is put back, then I assume that means that, in order for the
> query to return true, the word "coder" must occur at least once in the
> document and the word "ninja", if it occurs at all, must never occur within
> 5 words of any "coder".

As you say, this interpretation would cause you to expect a result of false
from the whittled-down test (because "ninja" *does* occur within 5 words of
"coder").
However, the correct interpretation is more along the lines of:
    there must be at least one window of 5 words
        containing an occurrence of "coder" and
        not containing any occurrence of "ninja"
(Note that the window is allowed to 'extend beyond' the bounds of the search
context, otherwise a two-word element couldn't support a 5-word window.)
This interpretation implies a result of true for the test, since the 5-word
window that starts at "coder" does not contain an occurrence of "ninja".

So I don't think this issue indicates a bug in the semantics of
fts:ApplyFT*Window.

-- 
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 Monday, 21 February 2011 08:02:05 UTC