abstract class PhraseWeight extends Weight
Weight.DefaultBulkScorer| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
field |
(package private) ScoreMode |
scoreMode |
(package private) Similarity |
similarity |
(package private) Similarity.SimScorer |
stats |
parentQuery| Modifier | Constructor and Description |
|---|---|
protected |
PhraseWeight(Query query,
java.lang.String field,
IndexSearcher searcher,
ScoreMode scoreMode) |
| Modifier and Type | Method and Description |
|---|---|
Explanation |
explain(LeafReaderContext context,
int doc)
An explanation of the score computation for the named document.
|
protected abstract PhraseMatcher |
getPhraseMatcher(LeafReaderContext context,
Similarity.SimScorer scorer,
boolean exposeOffsets) |
protected abstract Similarity.SimScorer |
getStats(IndexSearcher searcher) |
boolean |
isCacheable(LeafReaderContext ctx) |
Matches |
matches(LeafReaderContext context,
int doc)
Returns
Matches for a specific document, or null if the document
does not match the parent query
A query match that contains no position information (for example, a Point or
DocValues query) will return MatchesUtils.MATCH_WITH_NO_TERMS |
Scorer |
scorer(LeafReaderContext context)
Returns a
Scorer which can iterate in order over all matching
documents and assign them a score. |
bulkScorer, extractTerms, getQuery, scorerSupplierfinal ScoreMode scoreMode
final Similarity.SimScorer stats
final Similarity similarity
final java.lang.String field
protected PhraseWeight(Query query, java.lang.String field, IndexSearcher searcher, ScoreMode scoreMode) throws java.io.IOException
java.io.IOExceptionprotected abstract Similarity.SimScorer getStats(IndexSearcher searcher) throws java.io.IOException
java.io.IOExceptionprotected abstract PhraseMatcher getPhraseMatcher(LeafReaderContext context, Similarity.SimScorer scorer, boolean exposeOffsets) throws java.io.IOException
java.io.IOExceptionpublic Scorer scorer(LeafReaderContext context) throws java.io.IOException
WeightScorer which can iterate in order over all matching
documents and assign them a score.
NOTE: null can be returned if no documents will be scored by this query.
NOTE: The returned Scorer does not have
LeafReader.getLiveDocs() applied, they need to be checked on top.
scorer in class Weightcontext - the LeafReaderContext for which to return the Scorer.Scorer which scores documents in/out-of order.java.io.IOException - if there is a low-level I/O errorpublic Explanation explain(LeafReaderContext context, int doc) throws java.io.IOException
Weightexplain in class Weightcontext - the readers context to create the Explanation for.doc - the document's id relative to the given context's readerjava.io.IOException - if an IOException occurspublic Matches matches(LeafReaderContext context, int doc) throws java.io.IOException
WeightMatches for a specific document, or null if the document
does not match the parent query
A query match that contains no position information (for example, a Point or
DocValues query) will return MatchesUtils.MATCH_WITH_NO_TERMSpublic boolean isCacheable(LeafReaderContext ctx)
true if the object can be cached against a given leaf