C# Class Rubber.DSL.Facet.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 custom value fields).
Inheritance: AbstractFacetBuilder
Datei anzeigen Open project: stephenpope/Rubber

Public Methods

Method Description
AddRange ( double from, double to ) : GeoDistanceFacetBuilder

Adds a range entry with explicit from and to.

AddUnboundedFrom ( double to ) : GeoDistanceFacetBuilder

Adds a range entry with explicit to and unbounded from.

AddUnboundedTo ( double from ) : GeoDistanceFacetBuilder

Adds a range entry with explicit from and unbounded to.

FacetFilter ( IFilterBuilder filter ) : GeoDistanceFacetBuilder

An additional filter used to further filter down the set of documents the facet will run on.

Field ( string fieldName ) : GeoDistanceFacetBuilder

The geo point field that will be used to extract the document location(s).

GeoDistance ( GeoDistance geoDistance ) : GeoDistanceFacetBuilder

The geo distance type used to compute the distance.

GeoDistanceFacetBuilder ( string name ) : System

Constructs a new geo distance with the provided facet name.

Geohash ( string geohash ) : GeoDistanceFacetBuilder

The geohash of the geo point to create the range distance facets from.

Global ( bool global ) : GeoDistanceFacetBuilder

Should the facet run in global mode (not bounded by the search query) or not (bounded by the search query). Defaults to false.

Lang ( string lang ) : GeoDistanceFacetBuilder

The language of the {@link #valueScript(string)} script.

Lat ( double lat ) : GeoDistanceFacetBuilder

The latitude to create the range distance facets from.

Lon ( double lon ) : GeoDistanceFacetBuilder

The longitude to create the range distance facets from.

Nested ( string nested ) : GeoDistanceFacetBuilder

Sets the nested path the facet will execute on. A match (root object) will then cause all the nested objects matching the path to be computed into the facet.

Point ( double lat, double lon ) : GeoDistanceFacetBuilder

The point to create the range distance facets from.

Scope ( string scope ) : GeoDistanceFacetBuilder

Marks the facet to run in a specific scope.

ScriptParam ( string name, object value ) : GeoDistanceFacetBuilder

Parameters for {@link #valueScript(string)} to improve performance when executing the same script with different parameters.

ToJsonObject ( ) : object
Unit ( DistanceUnit unit ) : GeoDistanceFacetBuilder

The distance unit to use. Defaults to {@link org.elasticsearch.common.unit.DistanceUnit#KILOMETERS}

ValueField ( string valueFieldName ) : GeoDistanceFacetBuilder

A custom value field (numeric) that will be used to provide aggregated data for each facet (for example, total).

ValueScript ( string valueScript ) : GeoDistanceFacetBuilder

A custom value script (result is numeric) that will be used to provide aggregated data for each facet (for example, total).

Method Details

AddRange() public method

Adds a range entry with explicit from and to.
public AddRange ( double from, double to ) : GeoDistanceFacetBuilder
from double The from distance limit
to double The to distance limit
return GeoDistanceFacetBuilder

AddUnboundedFrom() public method

Adds a range entry with explicit to and unbounded from.
public AddUnboundedFrom ( double to ) : GeoDistanceFacetBuilder
to double The to distance limit, from is unbounded.
return GeoDistanceFacetBuilder

AddUnboundedTo() public method

Adds a range entry with explicit from and unbounded to.
public AddUnboundedTo ( double from ) : GeoDistanceFacetBuilder
from double The from distance limit, to is unbounded.
return GeoDistanceFacetBuilder

FacetFilter() public method

An additional filter used to further filter down the set of documents the facet will run on.
public FacetFilter ( IFilterBuilder filter ) : GeoDistanceFacetBuilder
filter IFilterBuilder
return GeoDistanceFacetBuilder

Field() public method

The geo point field that will be used to extract the document location(s).
public Field ( string fieldName ) : GeoDistanceFacetBuilder
fieldName string
return GeoDistanceFacetBuilder

GeoDistance() public method

The geo distance type used to compute the distance.
public GeoDistance ( GeoDistance geoDistance ) : GeoDistanceFacetBuilder
geoDistance GeoDistance
return GeoDistanceFacetBuilder

GeoDistanceFacetBuilder() public method

Constructs a new geo distance with the provided facet name.
public GeoDistanceFacetBuilder ( string name ) : System
name string
return System

Geohash() public method

The geohash of the geo point to create the range distance facets from.
public Geohash ( string geohash ) : GeoDistanceFacetBuilder
geohash string
return GeoDistanceFacetBuilder

Global() public method

Should the facet run in global mode (not bounded by the search query) or not (bounded by the search query). Defaults to false.
public Global ( bool global ) : GeoDistanceFacetBuilder
global bool
return GeoDistanceFacetBuilder

Lang() public method

The language of the {@link #valueScript(string)} script.
public Lang ( string lang ) : GeoDistanceFacetBuilder
lang string
return GeoDistanceFacetBuilder

Lat() public method

The latitude to create the range distance facets from.
public Lat ( double lat ) : GeoDistanceFacetBuilder
lat double
return GeoDistanceFacetBuilder

Lon() public method

The longitude to create the range distance facets from.
public Lon ( double lon ) : GeoDistanceFacetBuilder
lon double
return GeoDistanceFacetBuilder

Nested() public method

Sets the nested path the facet will execute on. A match (root object) will then cause all the nested objects matching the path to be computed into the facet.
public Nested ( string nested ) : GeoDistanceFacetBuilder
nested string
return GeoDistanceFacetBuilder

Point() public method

The point to create the range distance facets from.
public Point ( double lat, double lon ) : GeoDistanceFacetBuilder
lat double Latitude
lon double Longitude
return GeoDistanceFacetBuilder

Scope() public method

Marks the facet to run in a specific scope.
public Scope ( string scope ) : GeoDistanceFacetBuilder
scope string
return GeoDistanceFacetBuilder

ScriptParam() public method

Parameters for {@link #valueScript(string)} to improve performance when executing the same script with different parameters.
public ScriptParam ( string name, object value ) : GeoDistanceFacetBuilder
name string
value object
return GeoDistanceFacetBuilder

ToJsonObject() public method

public ToJsonObject ( ) : object
return object

Unit() public method

The distance unit to use. Defaults to {@link org.elasticsearch.common.unit.DistanceUnit#KILOMETERS}
public Unit ( DistanceUnit unit ) : GeoDistanceFacetBuilder
unit DistanceUnit
return GeoDistanceFacetBuilder

ValueField() public method

A custom value field (numeric) that will be used to provide aggregated data for each facet (for example, total).
public ValueField ( string valueFieldName ) : GeoDistanceFacetBuilder
valueFieldName string
return GeoDistanceFacetBuilder

ValueScript() public method

A custom value script (result is numeric) that will be used to provide aggregated data for each facet (for example, total).
public ValueScript ( string valueScript ) : GeoDistanceFacetBuilder
valueScript string
return GeoDistanceFacetBuilder