Package org.apache.solr.search
Interface DocList
-
- All Known Implementing Classes:
DocSlice
public interface DocList
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 atoffset()
.- Since:
- solr 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasScores()
True if scores were retainedorg.apache.lucene.search.TotalHits.Relation
hitCountRelation()
DocIterator
iterator()
Returns an iterator that may be used to iterate over the documents in this DocListlong
matches()
Returns the total number of matches for the search (as opposed to just the number collected according tooffset()
andsize()
).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.
-
-
-
Method Detail
-
offset
int offset()
Returns the zero based offset of this list within the total ordered list of matches to the query.
-
size
int size()
Returns the number of ids in this list.
-
matches
long matches()
Returns the total number of matches for the search (as opposed to just the number collected according tooffset()
andsize()
). Hence it's always true that matches() >= size()- Returns:
- number of matches for the search(query & any filters)
-
hitCountRelation
org.apache.lucene.search.TotalHits.Relation hitCountRelation()
-
subset
DocList subset(int offset, int len)
Get a subset of an existing DocList. Returns null if not possible.
-
iterator
DocIterator iterator()
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.- See Also:
hasScores()
-
hasScores
boolean hasScores()
True if scores were retained
-
maxScore
float maxScore()
The maximum score for the search... only valid if scores were retained (if hasScores()==true)
-
-