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