SortSpec (Solr 3.6.2 API)
Keywords: org.apache.solr.search.SortSpec class

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
Class SortSpec

    java.lang.Object
      org.apache.solr.search.SortSpec

    public class SortSpec

extends Object

SortSpec encapsulates a Lucene Sort and a count of the number of documents to return.

Constructor Summary
`SortSpec(Sort sort, int num)`
`SortSpec(Sort sort, int offset, int num)`

Method Summary
`int` | `getCount()` Gets the number of documents to return after sorting.
`int` | `getOffset()` Offset into the list of results.
`Sort` | `getSort()` Gets the Lucene Sort object, or null for the default sort by score descending.
`boolean` | `includesScore()`
`static boolean` | `includesScore(Sort sort)`
`void` | `setSort(Sort s)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SortSpec

    public SortSpec(Sort sort,
                    int num)

### SortSpec

    public SortSpec(Sort sort,
                    int offset,
                    int num)

Method Detail

### setSort

    public void setSort(Sort s)

### includesScore

    public static boolean includesScore(Sort sort)

### includesScore

    public boolean includesScore()

### getSort

    public Sort getSort()

  Gets the Lucene Sort object, or null for the default sort by score descending.

### getOffset

    public int getOffset()

  Offset into the list of results.

### getCount

    public int getCount()

  Gets the number of documents to return after sorting.

  Returns:
    number of docs to return, or -1 for no cut off (just sort)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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