## org.apache.lucene.search
Class ConstantScoreQuery.ConstantWeight

    java.lang.Object
      org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

All Implemented Interfaces:
  Serializable, Weight

Enclosing class:
  ConstantScoreQuery

    protected class ConstantScoreQuery.ConstantWeight

extends Object
implements Weight

See Also:
  Serialized Form

Constructor Summary
`ConstantScoreQuery.ConstantWeight(Searcher searcher)`

Method Summary
`Explanation` `explain(IndexReader reader, int doc)` An explanation of the score computation for the named document.
`Query` `getQuery()` The query that this concerns.
`float` `getValue()` The weight for this query.
`void` `normalize(float norm)` Assigns the query normalization factor to this.
`Scorer` `scorer(IndexReader reader)` Constructs a scorer for this.
`float` `sumOfSquaredWeights()` The sum of squared weights of contained query clauses.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConstantScoreQuery.ConstantWeight

    public ConstantScoreQuery.ConstantWeight(Searcher searcher)

Method Detail

### getQuery

    public Query getQuery()

  Description copied from interface: `Weight`
  The query that this concerns.

  Specified by:
    `getQuery` in interface `Weight`

### getValue

    public float getValue()

  Description copied from interface: `Weight`
  The weight for this query.

  Specified by:
    `getValue` in interface `Weight`

### sumOfSquaredWeights

    public float sumOfSquaredWeights()
                              throws IOException

  Description copied from interface: `Weight`
  The sum of squared weights of contained query clauses.

  Specified by:
    `sumOfSquaredWeights` in interface `Weight`
  Throws:
    `IOException`

### normalize

    public void normalize(float norm)

  Description copied from interface: `Weight`
  Assigns the query normalization factor to this.

  Specified by:
    `normalize` in interface `Weight`

### scorer

    public Scorer scorer(IndexReader reader)
                  throws IOException

  Description copied from interface: `Weight`
  Constructs a scorer for this.

  Specified by:
    `scorer` in interface `Weight`
  Throws:
    `IOException`

### explain

    public Explanation explain(IndexReader reader,
                               int doc)
                        throws IOException

  Description copied from interface: `Weight`
  An explanation of the score computation for the named document.

  Specified by:
    `explain` in interface `Weight`
  Throws:
    `IOException`

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.