You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by dn...@apache.org on 2008/01/01 22:05:15 UTC

svn commit: r607913 - /lucene/java/trunk/src/java/org/apache/lucene/document/Document.java

Author: dnaber
Date: Tue Jan  1 13:05:15 2008
New Revision: 607913

URL: http://svn.apache.org/viewvc?rev=607913&view=rev
Log:
LUCENE-1113: fix for Document.getBoost() documentation

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/document/Document.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/Document.java?rev=607913&r1=607912&r2=607913&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/Document.java Tue Jan  1 13:05:15 2008
@@ -48,6 +48,8 @@
   /** Sets a boost factor for hits on any field of this document.  This value
    * will be multiplied into the score of all hits on this document.
    *
+   * <p>The default value is 1.0.
+   * 
    * <p>Values are multiplied into the value of {@link Fieldable#getBoost()} of
    * each field in this document.  Thus, this method in effect sets a default
    * boost for the fields of this document.
@@ -58,14 +60,15 @@
     this.boost = boost;
   }
 
-  /** Returns the boost factor for hits on any field of this document.
-   *
-   * <p>The default value is 1.0.
+  /** Returns, at indexing time, the boost factor as set by {@link #setBoost(float)}. 
    *
-   * <p>Note: This value is not stored directly with the document in the index.
-   * Documents returned from {@link IndexReader#document(int)} and
-   * {@link Hits#doc(int)} may thus not have the same value present as when
-   * this document was indexed.
+   * <p>Note that once a document is indexed this value is no longer available
+   * from the index.  At search time, for retrieved documents, this method always 
+   * returns 1. This however does not mean that the boost value set at  indexing 
+   * time was ignored - it was just combined with other indexing time factors and 
+   * stored elsewhere, for better indexing and search performance. (For more 
+   * information see the "norm(t,d)" part of the scoring formula in 
+   * {@link org.apache.lucene.search.Similarity Similarity}.)
    *
    * @see #setBoost(float)
    */