PHP Class Elastica\QueryBuilder\DSL\Aggregation

Inheritance: implements Elastica\QueryBuilder\DSL
Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
avg ( string $name ) : Elastica\Aggregation\Avg avg aggregation.
bucket_script ( string $name, array | null $bucketsPath = null, string | null $script = null ) : BucketScript bucket script aggregation.
cardinality ( string $name ) : Elastica\Aggregation\Cardinality cardinality aggregation.
children ( string $name ) children aggregation.
date_histogram ( string $name, string $field, integer $interval ) : DateHistogram date histogram aggregation.
date_range ( string $name ) : Elastica\Aggregation\DateRange date range aggregation.
extended_stats ( string $name ) : Elastica\Aggregation\ExtendedStats extended stats aggregation.
filter ( string $name, Elastica\Query\AbstractQuery $filter = null ) : Filter filter aggregation.
filters ( string $name ) : Filters filters aggregation.
geo_bounds ( string $name ) geo bounds aggregation.
geo_distance ( string $name, string $field, string | array $origin ) : Elastica\Aggregation\GeoDistance geo distance aggregation.
geohash_grid ( string $name, string $field ) : Elastica\Aggregation\GeohashGrid geohash grid aggregation.
getType ( ) : string must return type for QueryBuilder usage.
global_agg ( string $name ) : Elastica\Aggregation\GlobalAggregation global aggregation.
histogram ( string $name, string $field, integer $interval ) : Histogram histogram aggregation.
ipv4_range ( string $name, string $field ) : IpRange ipv4 range aggregation.
max ( string $name ) : Elastica\Aggregation\Max max aggregation.
min ( string $name ) : Elastica\Aggregation\Min min aggregation.
missing ( string $name, string $field ) : Elastica\Aggregation\Missing missing aggregation.
nested ( string $name, string $path ) : Elastica\Aggregation\Nested nested aggregation.
percentile_ranks ( string $name ) percentile ranks aggregation.
percentiles ( string $name, string $field = null ) : Elastica\Aggregation\Percentiles percentiles aggregation.
range ( string $name ) : Range range aggregation.
reverse_nested ( string $name, string $path = null ) : Elastica\Aggregation\ReverseNested reverse nested aggregation.
scripted_metric ( string $name, string | null $initScript = null, string | null $mapScript = null, string | null $combineScript = null, string | null $reduceScript = null ) : Elastica\Aggregation\ScriptedMetric scripted metric aggregation.
serial_diff ( string $name, string | null $bucketsPath = null ) : SerialDiff serial diff aggregation.
significant_terms ( string $name ) : SignificantTerms significant terms aggregation.
stats ( string $name ) : Elastica\Aggregation\Stats stats aggregation.
sum ( string $name ) : Elastica\Aggregation\Sum sum aggregation.
terms ( string $name ) : Terms terms aggregation.
top_hits ( string $name ) : TopHits top hits aggregation.
value_count ( string $name, string $field ) : Elastica\Aggregation\ValueCount value count aggregation.

Method Details

avg() public method

avg aggregation.
public avg ( string $name ) : Elastica\Aggregation\Avg
$name string
return Elastica\Aggregation\Avg

bucket_script() public method

bucket script aggregation.
public bucket_script ( string $name, array | null $bucketsPath = null, string | null $script = null ) : BucketScript
$name string
$bucketsPath array | null
$script string | null
return Elastica\Aggregation\BucketScript

cardinality() public method

cardinality aggregation.
public cardinality ( string $name ) : Elastica\Aggregation\Cardinality
$name string
return Elastica\Aggregation\Cardinality

date_histogram() public method

date histogram aggregation.
public date_histogram ( string $name, string $field, integer $interval ) : DateHistogram
$name string the name of this aggregation
$field string the name of the field on which to perform the aggregation
$interval integer the interval by which documents will be bucketed
return Elastica\Aggregation\DateHistogram

date_range() public method

date range aggregation.
public date_range ( string $name ) : Elastica\Aggregation\DateRange
$name string
return Elastica\Aggregation\DateRange

extended_stats() public method

extended stats aggregation.
public extended_stats ( string $name ) : Elastica\Aggregation\ExtendedStats
$name string
return Elastica\Aggregation\ExtendedStats

filter() public method

filter aggregation.
public filter ( string $name, Elastica\Query\AbstractQuery $filter = null ) : Filter
$name string
$filter Elastica\Query\AbstractQuery
return Elastica\Aggregation\Filter

filters() public method

filters aggregation.
public filters ( string $name ) : Filters
$name string
return Elastica\Aggregation\Filters

geo_distance() public method

geo distance aggregation.
public geo_distance ( string $name, string $field, string | array $origin ) : Elastica\Aggregation\GeoDistance
$name string the name if this aggregation
$field string the field on which to perform this aggregation
$origin string | array the point from which distances will be calculated
return Elastica\Aggregation\GeoDistance

geohash_grid() public method

geohash grid aggregation.
public geohash_grid ( string $name, string $field ) : Elastica\Aggregation\GeohashGrid
$name string the name of this aggregation
$field string the field on which to perform this aggregation
return Elastica\Aggregation\GeohashGrid

getType() public method

must return type for QueryBuilder usage.
public getType ( ) : string
return string

global_agg() public method

global aggregation.
public global_agg ( string $name ) : Elastica\Aggregation\GlobalAggregation
$name string
return Elastica\Aggregation\GlobalAggregation

histogram() public method

histogram aggregation.
public histogram ( string $name, string $field, integer $interval ) : Histogram
$name string the name of this aggregation
$field string the name of the field on which to perform the aggregation
$interval integer the interval by which documents will be bucketed
return Elastica\Aggregation\Histogram

ipv4_range() public method

ipv4 range aggregation.
public ipv4_range ( string $name, string $field ) : IpRange
$name string
$field string
return Elastica\Aggregation\IpRange

max() public method

max aggregation.
public max ( string $name ) : Elastica\Aggregation\Max
$name string
return Elastica\Aggregation\Max

min() public method

min aggregation.
public min ( string $name ) : Elastica\Aggregation\Min
$name string
return Elastica\Aggregation\Min

missing() public method

missing aggregation.
public missing ( string $name, string $field ) : Elastica\Aggregation\Missing
$name string
$field string
return Elastica\Aggregation\Missing

nested() public method

nested aggregation.
public nested ( string $name, string $path ) : Elastica\Aggregation\Nested
$name string
$path string the nested path for this aggregation
return Elastica\Aggregation\Nested

percentiles() public method

percentiles aggregation.
public percentiles ( string $name, string $field = null ) : Elastica\Aggregation\Percentiles
$name string the name of this aggregation
$field string the field on which to perform this aggregation
return Elastica\Aggregation\Percentiles

range() public method

range aggregation.
public range ( string $name ) : Range
$name string
return Elastica\Aggregation\Range

reverse_nested() public method

reverse nested aggregation.
public reverse_nested ( string $name, string $path = null ) : Elastica\Aggregation\ReverseNested
$name string The name of this aggregation
$path string Optional path to the nested object for this aggregation. Defaults to the root of the main document.
return Elastica\Aggregation\ReverseNested

scripted_metric() public method

scripted metric aggregation.
public scripted_metric ( string $name, string | null $initScript = null, string | null $mapScript = null, string | null $combineScript = null, string | null $reduceScript = null ) : Elastica\Aggregation\ScriptedMetric
$name string
$initScript string | null
$mapScript string | null
$combineScript string | null
$reduceScript string | null
return Elastica\Aggregation\ScriptedMetric

serial_diff() public method

serial diff aggregation.
public serial_diff ( string $name, string | null $bucketsPath = null ) : SerialDiff
$name string
$bucketsPath string | null
return Elastica\Aggregation\SerialDiff

significant_terms() public method

significant terms aggregation.
public significant_terms ( string $name ) : SignificantTerms
$name string
return Elastica\Aggregation\SignificantTerms

stats() public method

stats aggregation.
public stats ( string $name ) : Elastica\Aggregation\Stats
$name string
return Elastica\Aggregation\Stats

sum() public method

sum aggregation.
public sum ( string $name ) : Elastica\Aggregation\Sum
$name string
return Elastica\Aggregation\Sum

terms() public method

terms aggregation.
public terms ( string $name ) : Terms
$name string
return Elastica\Aggregation\Terms

top_hits() public method

top hits aggregation.
public top_hits ( string $name ) : TopHits
$name string
return Elastica\Aggregation\TopHits

value_count() public method

value count aggregation.
public value_count ( string $name, string $field ) : Elastica\Aggregation\ValueCount
$name string
$field string
return Elastica\Aggregation\ValueCount