Cake\ElasticSearch\FilterBuilder::geoDistanceRange PHP Method

geoDistanceRange() public method

### Example: {{{ $filter = $builder->geoDistanceRange('location', [40.73, -74.1], '10km', '20km'); $filter = $builder->geoDistanceRange('location', 'dr5r9ydj2y73', '5km', '10km'); }}}
See also: http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-filter.html
public geoDistanceRange ( string $field, array | string $location, string $from, string $to ) : Elastica\Filter\GeoDistanceRange
$field string The field to compare.
$location array | string The coordinate from which to compare.
$from string The initial distance radius.
$to string The ending distance radius.
return Elastica\Filter\GeoDistanceRange
    public function geoDistanceRange($field, $location, $from, $to)
    {
        return new Filter\GeoDistanceRange($field, $location, ['gte' => $from, 'lte' => $to]);
    }