\Elastica\QueryBuilder\DSLFilter

elasticsearch filter DSL.

Summary

Methods
Properties
Constants
getType()
bool_and()
bool()
exists()
geo_bounding_box()
geo_distance()
geo_distance_range()
geo_polygon()
geo_shape_provided()
geo_shape_pre_indexed()
geohash_cell()
has_child()
has_parent()
ids()
indices()
limit()
match_all()
missing()
nested()
bool_not()
numeric_range()
bool_or()
prefix()
query()
range()
regexp()
script()
term()
terms()
type()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getType()

getType() : string

must return type for QueryBuilder usage.

Returns

string

exists()

exists(string  $field) : \Elastica\Filter\Exists

exists filter.

Parameters

string $field

Returns

\Elastica\Filter\Exists

geo_bounding_box()

geo_bounding_box(string  $key, array  $coordinates) : \Elastica\Filter\GeoBoundingBox

geo bounding box filter.

Parameters

string $key
array $coordinates

Returns

\Elastica\Filter\GeoBoundingBox

geo_distance()

geo_distance(string  $key, array|string  $location, string  $distance) : \Elastica\Filter\GeoDistance

geo distance filter.

Parameters

string $key

Key

array|string $location

Location as array or geohash: array('lat' => 48.86, 'lon' => 2.35) OR 'drm3btev3e86'

string $distance

Distance

Returns

\Elastica\Filter\GeoDistance

geo_distance_range()

geo_distance_range(string  $key, array|string  $location, array  $ranges = array()) : \Elastica\Filter\GeoDistanceRange

geo distance rangefilter.

Parameters

string $key
array|string $location
array $ranges

Returns

\Elastica\Filter\GeoDistanceRange

geo_polygon()

geo_polygon(string  $key, array  $points) : \Elastica\Filter\GeoPolygon

geo polygon filter.

Parameters

string $key

Key

array $points

Points making up polygon

Returns

\Elastica\Filter\GeoPolygon

geo_shape_provided()

geo_shape_provided(string  $path, array  $coordinates, string  $shapeType = \Elastica\Filter\GeoShapeProvided::TYPE_ENVELOPE) : \Elastica\Filter\GeoShapeProvided

provided geo shape filter.

Parameters

string $path
array $coordinates
string $shapeType

Returns

\Elastica\Filter\GeoShapeProvided

geo_shape_pre_indexed()

geo_shape_pre_indexed(string  $path, string  $indexedId, string  $indexedType, string  $indexedIndex, string  $indexedPath) : \Elastica\Filter\GeoShapePreIndexed

pre indexed geo shape filter.

Parameters

string $path

The path/field of the shape searched

string $indexedId

Id of the pre-indexed shape

string $indexedType

Type of the pre-indexed shape

string $indexedIndex

Index of the pre-indexed shape

string $indexedPath

Path of the pre-indexed shape

Returns

\Elastica\Filter\GeoShapePreIndexed

geohash_cell()

geohash_cell(string  $key, array|string  $location, integer|string  $precision = -1, boolean  $neighbors = false) : \Elastica\Filter\GeohashCell

geohash cell filter.

Parameters

string $key

The field on which to filter

array|string $location

Location as coordinates array or geohash string ['lat' => 40.3, 'lon' => 45.2]

integer|string $precision

length of geohash prefix or distance (3, or "50m")

boolean $neighbors

If true, filters cells next to the given cell.

Returns

\Elastica\Filter\GeohashCell

ids()

ids(string|\Elastica\Type  $type = null, array  $ids = array()) : \Elastica\Filter\Ids

ids filter.

Parameters

string|\Elastica\Type $type
array $ids

Returns

\Elastica\Filter\Ids

indices()

indices(\Elastica\Filter\AbstractFilter  $filter, array<mixed,string>  $indices) : \Elastica\Filter\Indices

indices filter.

Parameters

\Elastica\Filter\AbstractFilter $filter

filter which will be applied to docs in the specified indices

array<mixed,string> $indices

Returns

\Elastica\Filter\Indices

limit()

limit(integer  $limit) : \Elastica\Filter\Limit

limit filter.

Parameters

integer $limit

Limit

Returns

\Elastica\Filter\Limit

missing()

missing(string  $field = '') : \Elastica\Filter\Missing

missing filter.

Parameters

string $field

Returns

\Elastica\Filter\Missing

numeric_range()

numeric_range(string  $fieldName = '', array  $args = array()) : \Elastica\Filter\NumericRange

numeric range filter.

Parameters

string $fieldName

Field name

array $args

Field arguments

Returns

\Elastica\Filter\NumericRange

prefix()

prefix(string  $field = '', string  $prefix = '') : \Elastica\Filter\Prefix

prefix filter.

Parameters

string $field
string $prefix

Returns

\Elastica\Filter\Prefix

range()

range(string  $fieldName = '', array  $args = array()) : \Elastica\Filter\Range

range filter.

Parameters

string $fieldName
array $args

Returns

\Elastica\Filter\Range

regexp()

regexp(string  $field = '', string  $regexp = '', array  $options = array()) : \Elastica\Filter\Regexp

regexp filter.

Parameters

string $field

Field name

string $regexp

Regular expression

array $options

Regular expression options

Returns

\Elastica\Filter\Regexp

term()

term(array  $term = array()) : \Elastica\Filter\Term

term filter.

Parameters

array $term

Returns

\Elastica\Filter\Term

terms()

terms(string  $key = '', array  $terms = array()) : \Elastica\Filter\Terms

terms filter.

Parameters

string $key
array $terms

Returns

\Elastica\Filter\Terms

type()

type(string  $type = null) : \Elastica\Filter\Type

type filter.

Parameters

string $type

Returns

\Elastica\Filter\Type