|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.search.sort.SortBuilder org.elasticsearch.search.sort.GeoDistanceSortBuilder
public class GeoDistanceSortBuilder
A geo distance based sorting on a geo point like field.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
GeoDistanceSortBuilder(String fieldName)
Constructs a new distance based sort on a geo point like field. |
Method Summary | |
---|---|
GeoDistanceSortBuilder |
geoDistance(GeoDistance geoDistance)
The geo distance type used to compute the distance. |
GeoDistanceSortBuilder |
geohash(String geohash)
The geohash of the geo point to create the range distance facets from. |
SortBuilder |
missing(Object missing)
Not relevant. |
GeoDistanceSortBuilder |
order(SortOrder order)
The order of sorting. |
GeoDistanceSortBuilder |
point(double lat,
double lon)
The point to create the range distance facets from. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
GeoDistanceSortBuilder |
unit(DistanceUnit unit)
The distance unit to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoDistanceSortBuilder(String fieldName)
fieldName
- The geo point like field name.Method Detail |
---|
public GeoDistanceSortBuilder point(double lat, double lon)
lat
- latitude.lon
- longitude.public GeoDistanceSortBuilder geohash(String geohash)
public GeoDistanceSortBuilder geoDistance(GeoDistance geoDistance)
public GeoDistanceSortBuilder unit(DistanceUnit unit)
DistanceUnit.KILOMETERS
public GeoDistanceSortBuilder order(SortOrder order)
SortOrder.ASC
.
order
in class SortBuilder
public SortBuilder missing(Object missing)
missing
in class SortBuilder
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |