[Bug 3905] [FT] Allow negative weights

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


jim.melton@acm.org changed:

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




------- Comment #1 from jim.melton@acm.org  2007-01-04 19:51 -------
There is a new conformance subsection and the addition of the words "absolute
value" in section 2.3.1 bullet 3 and a small cleanup to make the bullets
consistent

----
2.3.1 Using Weights Within a Scored FTContainsExpr

[Definition: Scoring may be influenced by adding weight declarations to search
tokens, phrases, and expressions.] Syntactically weight declarations are
introduced in the FTSelection production, described in FTSelections.

    for $b in /books/book
    let score $s := $b/content ftcontains ("web site" weight 0.2)
                                       && ("usability" weight 0.8)
    return <result score="{$s}">{$b}</result>

The effect of weights on the result score is implementation-dependent. However,
weight declarations must follow all these rules:

1. Weights in an FTContainsExpr are significant only in relation to each other.
2. When no explicit weight is specified, the default weight is 1.0.
3. The weight must have an absolute value between 0.0 and 1000.0 inclusive.

Weight declarations in an FTContainsExpr for which no scores are evaluated are
ignored.

---

(New) 5.2.14 Weights

An implementation may constrain the range of valid weights to non-negative
values. If an implementation does enforce this restriction and encounters a
full-text query that used a negative weight, it MUST raise an error
[err:XXXTBD].

Received on Thursday, 4 January 2007 19:51:45 UTC