com.senseidb.search.client.json.req
Class Sort
java.lang.Object
com.senseidb.search.client.json.req.Sort
public class Sort
- extends Object
This parameter specifies how the search results should be sorted. The results can be sorted based on one or multiple
fields, in either ascending or descending order. The value of this parameter consists of a list of comma separated
strings, each of which can be one of the following values:
• relevance: this means that the results should be sorted by scores in descending order.
• relrev: this means that the results should be sorted by scores in ascending order.
• doc: this means that the results should be sorted by doc ids in ascending order.
• docrev: this means that the results should be sorted by doc ids in descending order.
• :: this means that the results should be sorted by field in the
direction of , which can be either asc or desc.
Example : Sort Fields Parameters
sort=relevance
sort=docrev
sort=price:desc,color=asc
|
Constructor Summary |
Sort()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sort
public Sort()
asc
public static Sort asc(String field)
desc
public static Sort desc(String field)
byRelevance
public static Sort byRelevance()
getField
public String getField()
getOrder
public Sort.Order getOrder()
Copyright © 2010-2012. All Rights Reserved.