[Bug 3596] second order aspect of scoring expressions

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


holstege@mathling.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from holstege@mathling.com  2006-10-05 17:23 -------
The WG had considered scoring and the various alternatives at length.
The problem with separating scoring as you suggest is that it makes it both
harder to optimize queries, and harder to create them (for complex queries).
In answer to your specific question:

The score applies to the entire expresssion.  In theory the expression doesn't
even need to incorporate ftcontains.

Some examples, that we intend to incorporate into the draft to illustrate:

Return matching paragraphs in order of overall score:

for $p score $score in //book[title ftcontains "hello"]/para[. ftcontains
"world"]
     order by $score descending
  return $p

Return the matching paragraphs ordered so that those from the highest scoring
books precede those from the lowest scoring books, where the highest scoring
paragraphs of each book are returned before the lower scoring paragraphs of
that book:

for $b score $score1 in //book[title ftcontains "hello"]
    order by $score1 descending
return
    for $p score $score2 in $b/para[. ftcontains "world"]
       order by $score2 descending
    return $p

We indent to close this bug with the addition of this clarification
to the specification. If you wish to object to the closure, please re-open the
bug.

Mary Holstege
for Full-Text Task Force of the XQuery Working Group

Received on Thursday, 5 October 2006 17:23:19 UTC