SpanWeight (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.spans.SpanWeight class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search.spans
Class SpanWeight

    java.lang.Object
      org.apache.lucene.search.spans.SpanWeight

All Implemented Interfaces:
  Serializable, Weight

Direct Known Subclasses:
  BoostingTermQuery.BoostingTermWeight

    public class SpanWeight

extends Object
implements Weight

Expert-only. Public for use by other weight implementations

See Also:
  Serialized Form

Field Summary
`protected float` | `idf`
`protected SpanQuery` | `query`
`protected float` | `queryNorm`
`protected float` | `queryWeight`
`protected Similarity` | `similarity`
`protected Set` | `terms`
`protected float` | `value`

Constructor Summary
`SpanWeight(SpanQuery query, 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 queryNorm)` 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`

Field Detail

### similarity

    protected Similarity similarity

### value

    protected float value

### idf

    protected float idf

### queryNorm

    protected float queryNorm

### queryWeight

    protected float queryWeight

### terms

    protected Set terms

### query

    protected SpanQuery query

Constructor Detail

### SpanWeight

    public SpanWeight(SpanQuery query,
                      Searcher searcher)
               throws IOException

Throws:
  `IOException`

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 queryNorm)

  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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