public interface DocList extends DocSet
DocList
represents the result of a query: an ordered list of document ids with optional score.
This list contains a subset of the complete list of documents actually matched: size()
document ids starting at offset()
.Modifier and Type | Method and Description |
---|---|
boolean |
hasScores()
True if scores were retained
|
DocIterator |
iterator()
Returns an iterator that may be used to iterate over the documents in this DocList
|
int |
matches()
Returns the total number of matches for the search
(as opposed to just the number collected according
to
offset() and size() ). |
float |
maxScore()
The maximum score for the search...
|
int |
offset()
Returns the zero based offset of this list within the total ordered list of matches to the query.
|
int |
size()
Returns the number of ids in this list.
|
DocList |
subset(int offset,
int len)
Get a subset of an existing DocList.
|
add, addAllTo, addUnique, andNot, andNotSize, exists, getTopFilter, intersection, intersectionSize, intersects, memSize, union, unionSize
int offset()
int matches()
offset()
and size()
).
Hence it's always true that matches() >= size()DocList subset(int offset, int len)
DocIterator iterator()
The order of the documents returned by this iterator is based on the
Sort order of the search that produced it. The Scoring information
is meaningful only if hasScores()
returns true.
iterator
in interface DocSet
hasScores()
boolean hasScores()
float maxScore()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.