LUCENE-1113: fix for Document.getBoost() documentation

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@607913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2008-01-01 21:05:15 +00:00
parent 75473edb02
commit 0ae1e1a905
1 changed files with 10 additions and 7 deletions

View File

@ -48,6 +48,8 @@ public final class Document implements java.io.Serializable {
/** 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 @@ public final class Document implements java.io.Serializable {
this.boost = boost;
}
/** Returns the boost factor for hits on any field of this document.
/** Returns, at indexing time, the boost factor as set by {@link #setBoost(float)}.
*
* <p>The default value is 1.0.
*
* <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)
*/