org.apache.solr.search
Interface DocList

All Superinterfaces:
DocSet
All Known Implementing Classes:
DocSlice

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().

Since:
solr 0.9

Field Summary
 
Fields inherited from interface org.apache.solr.search.DocSet
EMPTY
 
Method Summary
 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.
 
Methods inherited from interface org.apache.solr.search.DocSet
add, addAllTo, addUnique, andNot, andNotSize, exists, getTopFilter, intersection, intersectionSize, intersects, memSize, union, unionSize
 

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.

Specified by:
size in interface DocSet

matches

int matches()
Returns the total number of matches for the search (as opposed to just the number collected according to offset() and size()). Hence it's always true that matches() >= size()

Returns:
number of matches for the search(query & any filters)

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 DocList

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.

Specified by:
iterator in interface DocSet
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)



Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.