|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.search.SortSpec
public class SortSpec
SortSpec encapsulates a Lucene Sort and a count of the number of documents to return.
Constructor Summary | |
---|---|
SortSpec(Sort sort,
int num)
Deprecated. Specify both Sort and SchemaField[] when constructing |
|
SortSpec(Sort sort,
int offset,
int num)
Deprecated. Specify both Sort and SchemaField[] when constructing |
|
SortSpec(Sort sort,
List<SchemaField> fields)
|
|
SortSpec(Sort sort,
SchemaField[] fields)
|
Method Summary | |
---|---|
int |
getCount()
Gets the number of documents to return after sorting. |
int |
getOffset()
Offset into the list of results. |
List<SchemaField> |
getSchemaFields()
Gets the Solr SchemaFields that correspond to each of the SortFields used in this sort. |
Sort |
getSort()
Gets the Lucene Sort object, or null for the default sort by score descending. |
boolean |
includesScore()
|
static boolean |
includesScore(Sort sort)
|
void |
setCount(int count)
|
void |
setOffset(int offset)
|
void |
setSort(Sort s)
Deprecated. use setSortAndFields(org.apache.lucene.search.Sort, java.util.List |
void |
setSortAndFields(Sort s,
List<SchemaField> fields)
the specified SchemaFields must correspond one to one with the Sort's SortFields, using null where appropriate. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SortSpec(Sort sort, List<SchemaField> fields)
public SortSpec(Sort sort, SchemaField[] fields)
@Deprecated public SortSpec(Sort sort, int num)
@Deprecated public SortSpec(Sort sort, int offset, int num)
Method Detail |
---|
@Deprecated public void setSort(Sort s)
setSortAndFields(org.apache.lucene.search.Sort, java.util.List)
public void setSortAndFields(Sort s, List<SchemaField> fields)
public static boolean includesScore(Sort sort)
public boolean includesScore()
public Sort getSort()
public List<SchemaField> getSchemaFields()
public int getOffset()
public void setOffset(int offset)
public int getCount()
public void setCount(int count)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |