public abstract class SpanQuery extends Query
| Constructor and Description | 
|---|
| SpanQuery() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract SpanWeight | createWeight(IndexSearcher searcher,
            ScoreMode scoreMode,
            float boost)Expert: Constructs an appropriate Weight implementation for this query. | 
| abstract String | getField()Returns the name of the field matched by this query. | 
| static Map<Term,TermStates> | getTermStates(Collection<SpanWeight> weights)Build a map of terms to  TermStates, for use in constructing SpanWeights | 
| static Map<Term,TermStates> | getTermStates(SpanWeight... weights)Build a map of terms to  TermStates, for use in constructing SpanWeights | 
public abstract String getField()
public abstract SpanWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryscoreMode - How the produced scorers will be consumed.boost - The boost that is propagated by the parent queries.IOExceptionpublic static Map<Term,TermStates> getTermStates(SpanWeight... weights)
TermStates, for use in constructing SpanWeightspublic static Map<Term,TermStates> getTermStates(Collection<SpanWeight> weights)
TermStates, for use in constructing SpanWeightsCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.