public class BitSetAwareDocumentResultScores extends Object implements DocumentResultScores
DocumentResultScores.Block
Constructor and Description |
---|
BitSetAwareDocumentResultScores(BitSet bitSet,
DocumentResultScores documentResultScores) |
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.
|
public BitSetAwareDocumentResultScores(BitSet bitSet, DocumentResultScores documentResultScores)
public float incrementScore(int docId, byte increment)
DocumentResultScores
incrementScore
in interface DocumentResultScores
docId
- the document Idincrement
- the amount to increase score by (must be greater than zero)public float multiplyScore(int docId, float factor)
DocumentResultScores
multiplyScore
in interface DocumentResultScores
docId
- the document Id to change the score offactor
- the factor to multiple the document's current score by.public float getScore(int docId)
DocumentResultScores
getScore
in interface DocumentResultScores
docId
- the document idpublic void setScore(int docId, float score)
DocumentResultScores
setScore
in interface DocumentResultScores
docId
- the document Id to set the score for.score
- the new score for this document.public void each(DocumentResultScores.Block block)
DocumentResultScores
each
in interface DocumentResultScores
block
- the block to run against each document id and score pair.public long size()
DocumentResultScores
size
in interface DocumentResultScores
Copyright © 2003–2016 Atlassian. All rights reserved.