java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.spans.SpanQuery
- Direct Known Subclasses:
FieldMaskingSpanQuery,PayloadScoreQuery,SpanContainQuery,SpanMultiTermQueryWrapper,SpanNearQuery,SpanNearQuery.SpanGapQuery,SpanNotQuery,SpanOrQuery,SpanPayloadCheckQuery,SpanPositionCheckQuery,SpanTermQuery
Base class for span-based queries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SpanWeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) Expert: Constructs an appropriate Weight implementation for this query.abstract StringgetField()Returns the name of the field matched by this query.static Map<Term, TermStates> getTermStates(Collection<SpanWeight> weights) Build a map of terms toTermStates, for use in constructing SpanWeightsstatic Map<Term, TermStates> getTermStates(SpanWeight... weights) Build a map of terms toTermStates, for use in constructing SpanWeights
-
Constructor Details
-
SpanQuery
public SpanQuery()
-
-
Method Details
-
getField
Returns the name of the field matched by this query. -
createWeight
public abstract SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) 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- Parameters:
scoreMode- How the produced scorers will be consumed.boost- The boost that is propagated by the parent queries.- Throws:
IOException
-
getTermStates
Build a map of terms toTermStates, for use in constructing SpanWeights -
getTermStates
Build a map of terms toTermStates, for use in constructing SpanWeights
-