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 java.lang.String |
getField()
Returns the name of the field matched by this query.
|
static java.util.Map<Term,TermContext> |
getTermContexts(java.util.Collection<SpanWeight> weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
static java.util.Map<Term,TermContext> |
getTermContexts(SpanWeight... weights)
Build a map of terms to termcontexts, for use in constructing SpanWeights
|
public abstract java.lang.String getField()
public abstract SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws java.io.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.java.io.IOException
public static java.util.Map<Term,TermContext> getTermContexts(SpanWeight... weights)
public static java.util.Map<Term,TermContext> getTermContexts(java.util.Collection<SpanWeight> weights)
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.