public abstract class SpanQuery extends Query
Constructor and Description |
---|
SpanQuery() |
Modifier and Type | Method and Description |
---|---|
abstract SpanWeight |
createWeight(IndexSearcher searcher,
boolean needsScores,
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,TermContext> |
getTermContexts(Collection<SpanWeight> weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
static Map<Term,TermContext> |
getTermContexts(SpanWeight... weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
public abstract String getField()
public abstract SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
needsScores
- True if document scores (Scorer.score()
) are needed.boost
- The boost that is propagated by the parent queries.IOException
public static Map<Term,TermContext> getTermContexts(SpanWeight... weights)
public static Map<Term,TermContext> getTermContexts(Collection<SpanWeight> weights)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.