|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.client.solrj.SolrQuery.SortClause
public static class SolrQuery.SortClause
A single sort clause, encapsulating what to sort and the sort order.
The item specified can be "anything sortable" by solr; some examples
include a simple field name, the constant string score
, and functions
such as sum(x_f, y_f)
.
A SortClause can be created through different mechanisms:
new SortClause("product", SolrQuery.ORDER.asc);
new SortClause("product", "asc");
SortClause.asc("product");
SortClause.desc("product");
Constructor Summary | |
---|---|
SolrQuery.SortClause(String item,
SolrQuery.ORDER order)
Creates a SortClause based on item and order |
|
SolrQuery.SortClause(String item,
String order)
Creates a SortClause based on item and order |
Method Summary | |
---|---|
static SolrQuery.SortClause |
asc(String item)
Creates an ascending SortClause for an item |
static SolrQuery.SortClause |
create(String item,
SolrQuery.ORDER order)
Creates an ascending SortClause for an item |
static SolrQuery.SortClause |
create(String item,
String order)
Creates a SortClause based on item and order |
static SolrQuery.SortClause |
desc(String item)
Creates a decending SortClause for an item |
boolean |
equals(Object other)
|
String |
getItem()
Gets the item to sort, typically a function or a fieldname |
SolrQuery.ORDER |
getOrder()
Gets the order to sort |
int |
hashCode()
|
String |
toString()
Gets a human readable description of the sort clause. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SolrQuery.SortClause(String item, SolrQuery.ORDER order)
item
- item to sort onorder
- direction to sortpublic SolrQuery.SortClause(String item, String order)
item
- item to sort onorder
- string value for direction to sortMethod Detail |
---|
public static SolrQuery.SortClause create(String item, SolrQuery.ORDER order)
item
- item to sort onpublic static SolrQuery.SortClause create(String item, String order)
item
- item to sort onorder
- string value for direction to sortpublic static SolrQuery.SortClause asc(String item)
item
- item to sort onpublic static SolrQuery.SortClause desc(String item)
item
- item to sort onpublic String getItem()
public SolrQuery.ORDER getOrder()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
The returned string is not suitable for passing to Solr, but may be useful in debug output and the like.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |