public class SortBuilders
extends java.lang.Object
SortBuilders.| Constructor | Description |
|---|---|
SortBuilders() |
| Modifier and Type | Method | Description |
|---|---|---|
static FieldSortBuilder |
fieldSort(java.lang.String field) |
Constructs a new field based sort.
|
static GeoDistanceSortBuilder |
geoDistanceSort(java.lang.String fieldName,
double lat,
double lon) |
A geo distance based sort.
|
static GeoDistanceSortBuilder |
geoDistanceSort(java.lang.String fieldName,
java.lang.String... geohashes) |
Constructs a new distance based sort on a geo point like field.
|
static GeoDistanceSortBuilder |
geoDistanceSort(java.lang.String fieldName,
GeoPoint... points) |
Constructs a new distance based sort on a geo point like field.
|
static ScoreSortBuilder |
scoreSort() |
Constructs a new score sort.
|
static ScriptSortBuilder |
scriptSort(Script script,
ScriptSortBuilder.ScriptSortType type) |
Constructs a new script based sort.
|
public static ScoreSortBuilder scoreSort()
public static FieldSortBuilder fieldSort(java.lang.String field)
field - The field name.public static ScriptSortBuilder scriptSort(Script script, ScriptSortBuilder.ScriptSortType type)
script - The script to use.type - The type, can either be "string" or "number".public static GeoDistanceSortBuilder geoDistanceSort(java.lang.String fieldName, double lat, double lon)
fieldName - The geo point like field name.lat - Latitude of the point to create the range distance facets from.lon - Longitude of the point to create the range distance facets from.public static GeoDistanceSortBuilder geoDistanceSort(java.lang.String fieldName, GeoPoint... points)
fieldName - The geo point like field name.points - The points to create the range distance facets from.public static GeoDistanceSortBuilder geoDistanceSort(java.lang.String fieldName, java.lang.String... geohashes)
fieldName - The geo point like field name.geohashes - The points to create the range distance facets from.