|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.search.contentnames.FloatArrayDocumentResultScores
public class FloatArrayDocumentResultScores
A DocumentScores implementation which will keep each score in a float array where the position in the
array matches the docId for each document.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.confluence.search.contentnames.DocumentResultScores |
|---|
DocumentResultScores.Block |
| Constructor Summary | |
|---|---|
FloatArrayDocumentResultScores(int size)
|
|
| 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)
Increments the score for docId. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FloatArrayDocumentResultScores(int size)
size - size of the underlying byte array| Method Detail |
|---|
public float incrementScore(int docId,
byte increment)
Byte.MAX_VALUE the score is left at the max value.
incrementScore in interface DocumentResultScoresdocId - the document idincrement - how much to increment the score by. Must be greater than 0.
public float multiplyScore(int docId,
float factor)
DocumentResultScores
multiplyScore in interface DocumentResultScoresdocId - 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 DocumentResultScoresdocId - the document id
public void setScore(int docId,
float score)
DocumentResultScores
setScore in interface DocumentResultScoresdocId - 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 DocumentResultScoresblock - the block to run against each document id and score pair.public long size()
DocumentResultScores
size in interface DocumentResultScores
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||