public abstract class SpanQuery extends Query
| Constructor and Description |
|---|
SpanQuery() |
| Modifier and Type | Method and Description |
|---|---|
abstract SpanWeight |
createWeight(IndexSearcher searcher,
boolean needsScores)
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) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryneedsScores - True if document scores (Scorer.score()) or match
frequencies (Scorer.freq()) are needed.IOExceptionpublic static Map<Term,TermContext> getTermContexts(SpanWeight... weights)
public static Map<Term,TermContext> getTermContexts(Collection<SpanWeight> weights)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.