Package org.apache.solr.search
Class TopDocsSlice
- java.lang.Object
-
- org.apache.solr.search.DocSlice
-
- org.apache.solr.search.TopDocsSlice
-
-
Constructor Summary
Constructors Constructor Description TopDocsSlice(int offset, int len, org.apache.lucene.search.TopDocs topDocs, long matches, boolean hasScores, float maxScore, org.apache.lucene.search.TotalHits.Relation matchesRelation)
Construct a slice off topDocs
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasScores()
True if scores were retainedDocIterator
iterator()
Returns an iterator that may be used to iterate over the documents in this DocListTopDocsSlice
subset(int offset, int len)
Get a subset of an existing DocList.-
Methods inherited from class org.apache.solr.search.DocSlice
getChildResources, hitCountRelation, matches, maxScore, offset, ramBytesUsed, size
-
-
-
-
Constructor Detail
-
TopDocsSlice
public TopDocsSlice(int offset, int len, org.apache.lucene.search.TopDocs topDocs, long matches, boolean hasScores, float maxScore, org.apache.lucene.search.TotalHits.Relation matchesRelation)
Construct a slice off topDocs- Parameters:
offset
- starting offset for this range of docslen
- length of resultsmatches
- total number of matches for the query
-
-
Method Detail
-
subset
public TopDocsSlice subset(int offset, int len)
Description copied from interface:DocList
Get a subset of an existing DocList. Returns null if not possible.
-
hasScores
public boolean hasScores()
Description copied from interface:DocList
True if scores were retained
-
iterator
public DocIterator iterator()
Description copied from interface:DocList
Returns an iterator that may be used to iterate over the documents in this DocListThe 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.- Specified by:
iterator
in interfaceDocList
- Overrides:
iterator
in classDocSlice
- See Also:
DocList.hasScores()
-
-