[Zope-CVS] CVS: Products/FieldedTextIndex/www - manageWeights.dtml:1.1

Casey Duncan casey at zope.com
Sat Jan 17 00:20:36 EST 2004


Update of /cvs-repository/Products/FieldedTextIndex/www
In directory cvs.zope.org:/tmp/cvs-serv6805/www

Added Files:
	manageWeights.dtml 
Log Message:
Add APIs and management screens to set default field weights. 


=== Added File Products/FieldedTextIndex/www/manageWeights.dtml ===
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<p class="form-help"> 
  Choose the default weights for the fields indexed. The weight is multiplied
  against the score for words matched in the field. Search results with words
  found in fields with higher weights will score better than other results.
  Typically you will weight fields higher which contain words which are more
  meaningful to the relevance of the object, such as title, subject or
  keywords. You can use zero weights for fields that are useful for filtering
  only and should not affect the score. Negative weights are also allowed.
</p>
<p class="form-help">
  Changing the default weights takes affect immediately and does not require
  a reindex. Individual queries may also override the default weights if 
  desired.
</p>

<dtml-if weights>
  <dtml-call expr="setDefaultWeights(weights)">
</dtml-if>

<form action="manage_weights" method="post">
  <table cellspacing="0" cellpadding="2" border="0">
    <tr class="list-header">
      <th>Field</td>
      <th>Weight</td>
    </tr>
    <dtml-in expr="getDefaultWeights().items()" sort="sequence-key">
      <dtml-if sequence-odd>
      <tr class="row-normal">
      <dtml-else>
      <tr class="row-hilite">
      </dtml-if>
        <td class="form-label" align="right">&dtml-sequence-key;</td>
        <td><input size="3" name="weights.&dtml-sequence-key;:record"
                   value="&dtml-sequence-item;" /></td>
      </tr>
    <dtml-else>
      <tr><td colspan="2"><em>No fields indexed.</em></td></tr>
    </dtml-in>
  </table>
  <br />
  <input type="submit" value="Save Changes" />
</form>
    
<dtml-var manage_page_footer>




More information about the Zope-CVS mailing list