Index: Weight.java =================================================================== RCS file: /home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/search/Weight.java,v retrieving revision 1.4 diff -u -3 -p -r1.4 Weight.java --- Weight.java 17 Aug 2004 20:38:45 -0000 1.4 +++ Weight.java 21 Sep 2004 19:07:01 -0000 @@ -21,13 +21,18 @@ import java.io.IOException; import org.apache.lucene.index.IndexReader; /** Expert: Calculate query weights and build query scorers. - * - *

A Weight is constructed by a query, given a Searcher ({@link - * Query#createWeight(Searcher)}). The {@link #sumOfSquaredWeights()} method - * is then called on the top-level query to compute the query normalization - * factor {@link Similarity#queryNorm(float)}. This factor is then passed to - * {@link #normalize(float)}. At this point the weighting is complete and a - * scorer may be constructed by calling {@link #scorer(IndexReader)}. + *
A Weight is used in the following way: + *

    + *
  1. A Weight is constructed by a top-level query, + * given a Searcher ({@link Query#createWeight(Searcher)}). + *
  2. The {@link #sumOfSquaredWeights()} method is called + * on the Weight to compute + * the query normalization factor {@link Similarity#queryNorm(float)} + * of the query clauses contained in the query. + *
  3. The query normalization factor is passed to {@link #normalize(float)}. + * At this point the weighting is complete. + *
  4. A Scorer is constructed by {@link #scorer(IndexReader)}. + *
*/ public interface Weight extends java.io.Serializable { /** The query that this concerns. */