public interface DocumentResultScores
Modifier and Type | Interface and Description |
---|---|
static interface |
DocumentResultScores.Block
Callback interface to provide clients with the ability to run custom code against all document and score pairs
maintained by this class.
|
Modifier and Type | Method and Description |
---|---|
void |
each(DocumentResultScores.Block block)
Iterates through all docId and score pairs where the score is greater than zero and then executes the block
against each pair.
|
float |
getScore(int docId)
Retrieve the score for the specified docId.
|
float |
incrementScore(int docId,
byte increment)
Increase the score for the specified document by the supplied amount.
|
float |
multiplyScore(int docId,
float factor)
Multiply the score of the specified document by the supplied factor.
|
void |
setScore(int docId,
float score)
Override any existing score for the specified document and replace with the new supplied score.
|
long |
size()
Returns the number of scores.
|
float incrementScore(int docId, byte increment)
docId
- the document Idincrement
- the amount to increase score by (must be greater than zero)IllegalArgumentException
- if increment is less than or equal to zerofloat multiplyScore(int docId, float factor)
docId
- the document Id to change the score offactor
- the factor to multiple the document's current score by.float getScore(int docId)
docId
- the document idvoid setScore(int docId, float score)
docId
- the document Id to set the score for.score
- the new score for this document.void each(DocumentResultScores.Block block)
block
- the block to run against each document id and score pair.long size()
Copyright © 2003–2015 Atlassian. All rights reserved.