<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3905</bug_id>
          
          <creation_ts>2006-10-31 22:31:01 +0000</creation_ts>
          <short_desc>[FT] Allow negative weights</short_desc>
          <delta_ts>2007-01-04 19:53:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Full Text 1.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>3743</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mary Holstege">holstege</reporter>
          <assigned_to name="Jim Melton">jim.melton</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12697</commentid>
    <comment_count>0</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2006-10-31 22:31:01 +0000</bug_when>
    <thetext>Allow for weights to be negative.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13351</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-01-04 19:51:34 +0000</bug_when>
    <thetext>There is a new conformance subsection and the addition of the words &quot;absolute value&quot; 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 (&quot;web site&quot; weight 0.2)
                                       &amp;&amp; (&quot;usability&quot; weight 0.8)
    return &lt;result score=&quot;{$s}&quot;&gt;{$b}&lt;/result&gt;

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].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13352</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-01-04 19:53:30 +0000</bug_when>
    <thetext>Because you were present when the decision was made to resolve this bug, and (indeed) you wrote the changes, we presume that you accept the resolution and are thus closing the bug. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>