public class DefaultQueryHits extends AbstractQueryHits
Constructor and Description |
---|
DefaultQueryHits(Collection<ScoreNode> scoreNodes)
Creates a new
DefaultQueryHits instance based on the passed
scoreNodes . |
Modifier and Type | Method and Description |
---|---|
int |
getSize()
This default implementation returns
-1 . |
ScoreNode |
nextScoreNode()
Returns the next score node in this QueryHits or
null if
there are no more score nodes. |
close, skip
public DefaultQueryHits(Collection<ScoreNode> scoreNodes)
DefaultQueryHits
instance based on the passed
scoreNodes
.scoreNodes
- a collection of ScoreNode
s.public ScoreNode nextScoreNode() throws IOException
null
if
there are no more score nodes.IOException
- if an error occurs while reading from the index.public int getSize()
-1
.getSize
in interface CloseableHits
getSize
in class AbstractQueryHits
-1
.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.