|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.search.facet.AbstractFacetBuilder org.elasticsearch.search.facet.geodistance.GeoDistanceFacetBuilder
public class GeoDistanceFacetBuilder
A geo distance builder allowing to create a facet of distances from a specific location including the number of hits within each distance range, and aggregated data (like totals of either the distance or cusotm value fields).
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from class org.elasticsearch.search.facet.AbstractFacetBuilder |
---|
facetFilter, name, nested, scope |
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
GeoDistanceFacetBuilder(String name)
Constructs a new geo distance with the provided facet name. |
Method Summary | |
---|---|
GeoDistanceFacetBuilder |
addRange(double from,
double to)
Adds a range entry with explicit from and to. |
GeoDistanceFacetBuilder |
addUnboundedFrom(double to)
Adds a range entry with explicit to and unbounded from. |
GeoDistanceFacetBuilder |
addUnboundedTo(double from)
Adds a range entry with explicit from and unbounded to. |
GeoDistanceFacetBuilder |
facetFilter(FilterBuilder filter)
|
GeoDistanceFacetBuilder |
field(String fieldName)
The geo point field that will be used to extract the document location(s). |
GeoDistanceFacetBuilder |
geoDistance(GeoDistance geoDistance)
The geo distance type used to compute the distance. |
GeoDistanceFacetBuilder |
geohash(String geohash)
The geohash of the geo point to create the range distance facets from. |
GeoDistanceFacetBuilder |
global(boolean global)
Marks the facet to run in a global scope, not bounded by any query. |
GeoDistanceFacetBuilder |
lang(String lang)
The language of the valueScript(String) script. |
GeoDistanceFacetBuilder |
lat(double lat)
The latitude to create the range distance facets from. |
GeoDistanceFacetBuilder |
lon(double lon)
The longitude to create the range distance facets from. |
GeoDistanceFacetBuilder |
nested(String nested)
Sets the nested path the facet will execute on. |
GeoDistanceFacetBuilder |
point(double lat,
double lon)
The point to create the range distance facets from. |
GeoDistanceFacetBuilder |
scope(String scope)
Marks the facet to run in a specific scope. |
GeoDistanceFacetBuilder |
scriptParam(String name,
Object value)
Parameters for valueScript(String) to improve performance when executing the same script with different parameters. |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
GeoDistanceFacetBuilder |
unit(DistanceUnit unit)
The distance unit to use. |
GeoDistanceFacetBuilder |
valueField(String valueFieldName)
A custom value field (numeric) that will be used to provide aggregated data for each facet (for example, total). |
GeoDistanceFacetBuilder |
valueScript(String valueScript)
A custom value script (result is numeric) that will be used to provide aggregated data for each facet (for example, total). |
Methods inherited from class org.elasticsearch.search.facet.AbstractFacetBuilder |
---|
addFilterFacetAndGlobal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeoDistanceFacetBuilder(String name)
Method Detail |
---|
public GeoDistanceFacetBuilder field(String fieldName)
public GeoDistanceFacetBuilder valueField(String valueFieldName)
public GeoDistanceFacetBuilder valueScript(String valueScript)
public GeoDistanceFacetBuilder lang(String lang)
valueScript(String)
script.
public GeoDistanceFacetBuilder scriptParam(String name, Object value)
valueScript(String)
to improve performance when executing the same script with different parameters.
public GeoDistanceFacetBuilder point(double lat, double lon)
lat
- latitude.lon
- longitude.public GeoDistanceFacetBuilder lat(double lat)
public GeoDistanceFacetBuilder lon(double lon)
public GeoDistanceFacetBuilder geohash(String geohash)
public GeoDistanceFacetBuilder geoDistance(GeoDistance geoDistance)
public GeoDistanceFacetBuilder addRange(double from, double to)
from
- The from distance limitto
- The to distance limitpublic GeoDistanceFacetBuilder addUnboundedTo(double from)
from
- the from distance limit, to is unbounded.public GeoDistanceFacetBuilder addUnboundedFrom(double to)
to
- the to distance limit, from is unbounded.public GeoDistanceFacetBuilder unit(DistanceUnit unit)
DistanceUnit.KILOMETERS
public GeoDistanceFacetBuilder global(boolean global)
global
in class AbstractFacetBuilder
public GeoDistanceFacetBuilder scope(String scope)
scope
in class AbstractFacetBuilder
public GeoDistanceFacetBuilder facetFilter(FilterBuilder filter)
facetFilter
in class AbstractFacetBuilder
public GeoDistanceFacetBuilder nested(String nested)
nested
in class AbstractFacetBuilder
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 |