org.apache.lucene.search.spans

Class SpanQuery

public abstract class SpanQuery extends Query

Base class for span-based queries.
Method Summary
protected WeightcreateWeight(Searcher searcher)
abstract StringgetField()
Returns the name of the field matched by this query.
abstract SpansgetSpans(IndexReader reader)
Expert: Returns the matches for this query in an index.
abstract CollectiongetTerms()
Returns a collection of all terms matched by this query.

Method Detail

createWeight

protected Weight createWeight(Searcher searcher)

getField

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

getSpans

public abstract Spans getSpans(IndexReader reader)
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-2007 Apache Software Foundation. All Rights Reserved.