Constructor and Description |
---|
ScoreNode(NodeId id,
float score)
Creates a new
ScoreNode . |
ScoreNode(NodeId id,
float score,
int doc)
Creates a new
ScoreNode . |
Modifier and Type | Method and Description |
---|---|
int |
getDoc(org.apache.lucene.index.IndexReader reader)
Returns the document number for this score node.
|
NodeId |
getNodeId() |
float |
getScore() |
void |
setScore(float score)
Sets a new score value.
|
String |
toString() |
public ScoreNode(NodeId id, float score)
ScoreNode
.id
- the node id.score
- the score value.public ScoreNode(NodeId id, float score, int doc)
ScoreNode
.id
- the node id.score
- the score value.doc
- the document number.public NodeId getNodeId()
ScoreNode
.public float getScore()
ScoreNode
.public void setScore(float score)
score
- the score value.public int getDoc(org.apache.lucene.index.IndexReader reader) throws IOException
reader
- the current index reader to look up the document if
needed.IOException
- if an error occurs while reading from the index or
the node is not present in the index.Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.