Package org.apache.lucene.search.spans
Class SpanQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.spans.SpanQuery
-
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
FieldMaskingSpanQuery,SpanMultiTermQueryWrapper,SpanNearQuery,SpanNotQuery,SpanOrQuery,SpanPositionCheckQuery,SpanTermQuery
public abstract class SpanQuery extends Query
Base class for span-based queries.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpanQuery()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(Searcher searcher)Expert: Constructs an appropriate Weight implementation for this query.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.-
Methods inherited from class org.apache.lucene.search.Query
clone, combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight
-
-
-
-
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.
-
createWeight
public Weight createWeight(Searcher searcher) throws IOException
Description copied from class:QueryExpert: Constructs an appropriate Weight implementation for this query.Only implemented by primitive queries, which re-write to themselves.
- Overrides:
createWeightin classQuery- Throws:
IOException
-
-