[Bug 8408] Clarification on StringExcludes and Windows

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





--- Comment #2 from Michael Dyck <jmdyck@ibiblio.org>  2009-12-07 03:12:25 ---
For completeness, here is my analysis of that example.

In the example document, the 'book' node has one occurrence of the word
"efficient" (call it E) and 3 occurrences of the word "and" (call them
A1, A2, A3). I'll use an ad hoc notation for matches.

     "efficient"
         generates 1 match:
             [include E]

     "and"
         generates 3 matches:
             [include A1],
             [include A2],
             [include A3]

     ftnot "and"
         fts:ApplyFTUnaryNot calls fts:UnaryNotHelper and generates a
         single match:
             [exclude A1, exclude A2, exclude A3]

     "efficient" ftand ftnot "and"
         fts:ApplyFTAnd generates a single match:
             [include E, exclude A1, exclude A2, exclude A3]

     "efficient" ftand ftnot "and" window 3 words
         fts:ApplyFTWindow calls fts:ApplyFTWordWindow, which takes the
         single match (from ApplyFTAnd) and finds all windows of width 3
         that contain all the stringIncludes of the match (i.e., just E),
         thus:

             and enable efficient

                 enable efficient and

                        efficient and effective

         For each such window, it generates a match consisting of:
         -- the "join" of the stringIncludes (i.e., just E again), and
         -- all of the stringExcludes (from the input match) that fall
            within the window. For the first window, this is the
            stringExclude for A2. For the second and third window, this
            is the stringExclude for A3.

         That is, it generates 3 matches:
            [include E, exclude A2],
            [include E, exclude A3],
            [include E, exclude A3]

     . ftcontains "efficient" ftand ftnot "and" window 3 words
         fts:FTContainsExpr receives the above 3 matches, looks for one
         that has zero stringExcludes, finds no such match, and so returns
         false (which agrees with the prose accompanying the example).

If there's a flaw in this reasoning, please let us know.


-- 
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, 7 December 2009 03:12:34 UTC