org.apache.lucene.search.spans

Class SpanQuery

Implemented Interfaces:
Cloneable, Serializable
Known Direct Subclasses:
SpanFirstQuery, SpanNearQuery, SpanNotQuery, SpanOrQuery, SpanRegexQuery, SpanTermQuery

public abstract class SpanQuery
extends Query

Base class for span-based queries.
See Also:
Serialized Form

Method Summary

protected Weight
createWeight(Searcher searcher)
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, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight

Method Details

createWeight

protected Weight createWeight(Searcher searcher)
            throws IOException
Overrides:
createWeight in interface Query

getField

public abstract String getField()
Returns the name of the field matched by this query.

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.

getTerms

public abstract Collection getTerms()
Returns a collection of all terms matched by this query.

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