Package org.apache.solr.search
Class TopDocsSlice
java.lang.Object
org.apache.solr.search.DocSlice
org.apache.solr.search.TopDocsSlice
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,DocList
TopDocsSlice implements DocList based off provided TopDocs.- Since:
- solr 9.9
-
Field Summary
Fields inherited from class org.apache.solr.search.DocSlice
docLength, len, matches, matchesRelation, maxScore, offsetFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionTopDocsSlice(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
Methods inherited from class org.apache.solr.search.DocSlice
getChildResources, hitCountRelation, matches, maxScore, offset, ramBytesUsed, size
-
Constructor Details
-
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 Details
-
subset
Description copied from interface:DocListGet a subset of an existing DocList. Returns null if not possible. -
hasScores
public boolean hasScores()Description copied from interface:DocListTrue if scores were retained -
iterator
Description copied from interface:DocListReturns 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.
-