java.lang.Object
org.apache.lucene.search.MaxScoreAccumulator
Maintains the maximum score and its corresponding document id concurrently
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final LongAccumulator
(package private) static final int
(package private) long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
accumulate
(int docId, float score) static int
docId
(long value) (package private) long
getRaw()
private static long
maxEncode
(long v1, long v2) Return the max encoded docId and score found in the two longs, following the encoding inaccumulate(int, float)
.static float
toScore
(long value)
-
Field Details
-
DEFAULT_INTERVAL
static final int DEFAULT_INTERVAL- See Also:
-
acc
-
modInterval
long modInterval
-
-
Constructor Details
-
MaxScoreAccumulator
MaxScoreAccumulator()
-
-
Method Details
-
maxEncode
private static long maxEncode(long v1, long v2) Return the max encoded docId and score found in the two longs, following the encoding inaccumulate(int, float)
. -
accumulate
void accumulate(int docId, float score) -
toScore
public static float toScore(long value) -
docId
public static int docId(long value) -
getRaw
long getRaw()
-