Package org.apache.lucene.index
Class Impacts
java.lang.Object
org.apache.lucene.index.Impacts
Information about upcoming impacts, ie. (freq, norm) pairs.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
getDocIdUpTo
(int level) Return the maximum inclusive doc ID until which the list of impacts returned bygetImpacts(int)
is valid.getImpacts
(int level) Return impacts on the given level.abstract int
Return the number of levels on which we have impacts.
-
Constructor Details
-
Impacts
protected Impacts()Sole constructor. Typically invoked by sub classes.
-
-
Method Details
-
numLevels
public abstract int numLevels()Return the number of levels on which we have impacts. The returned value is always greater than 0 and may not always be the same, even on a single postings list, depending on the current doc ID. -
getDocIdUpTo
public abstract int getDocIdUpTo(int level) Return the maximum inclusive doc ID until which the list of impacts returned bygetImpacts(int)
is valid. This is a non-decreasing function oflevel
. -
getImpacts
Return impacts on the given level. These impacts are sorted by increasing frequency and increasing unsigned norm, and only valid until the doc ID returned bygetDocIdUpTo(int)
for the same level, included. The returned list is never empty. NOTE: There is no guarantee that these impacts actually appear in postings, only that they trigger scores that are greater than or equal to the impacts that actually appear in postings.
-