|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentResultScores
Interface for storing, incrementing and iterating over document scores. Each document id is associated with one document score.
Nested Class Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Method Detail |
---|
float incrementScore(int docId, byte increment)
docId
- the document Idincrement
- the amount to increase score by (must be greater than zero)
java.lang.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 id
void 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |