DocList (Solr 3.6.2 API)
Keywords: org.apache.solr.search.DocList interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
Version:
  $Id: DocList.java 555343 2007-07-11 17:46:25Z hossman $

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, addUnique, andNot, andNotSize, exists, getBits, getTopFilter, intersection, intersectionSize, 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD