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 SpanQuery

    java.lang.Object
      org.apache.lucene.search.Query
          org.apache.lucene.search.spans.SpanQuery

All Implemented Interfaces:
  Cloneable, Serializable

Direct Known Subclasses:
  SpanFirstQuery, SpanNearQuery, SpanNotQuery, SpanOrQuery, SpanTermQuery

public abstract class SpanQuery
extends Query

Base class for span-based queries.

See Also:
  Serialized Form

Constructor Summary
`SpanQuery()`

Method Summary
`protected Weight` | `createWeight(Searcher searcher)` Expert: Constructs an appropriate Weight implementation for this query.
`abstract String` | `getField()` Returns the name of the field matched by this query.
`abstract Spans` | `getSpans(IndexReader reader)` Expert: Returns the matches for this query in an index.
`abstract Collection` | `getTerms()` Returns a collection of all terms matched by this query.

Methods inherited from class org.apache.lucene.search.Query
`clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight`

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

Constructor Detail

### SpanQuery

    public SpanQuery()

Method Detail

### getSpans

    public abstract Spans getSpans(IndexReader reader)
                            throws IOException

  Expert: Returns the matches for this query in an index. Used internally to search for spans.

  Throws:
    `IOException`

### getField

    public abstract String getField()

  Returns the name of the field matched by this query.

### getTerms

    public abstract Collection getTerms()

  Returns a collection of all terms matched by this query.

### createWeight

    protected Weight createWeight(Searcher searcher)

  Description copied from class: `Query`
  Expert: Constructs an appropriate Weight implementation for this query.

  Only implemented by primitive queries, which re-write to themselves.

  Overrides:
    `createWeight` in class `Query`

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-2005 Apache Software Foundation. All Rights Reserved.