Methods

getType()

getType() : string

must return type for QueryBuilder usage.

Returns

string

match()

match(string  $field = null, mixed  $values = null) : \Elastica\Query\Match

match query.

Parameters

string $field
mixed $values

Returns

\Elastica\Query\Match

common_terms()

common_terms(string  $field, string  $query, float  $cutoffFrequency) : \Elastica\Query\Common

common terms query.

Parameters

string $field
string $query
float $cutoffFrequency

percentage in decimal form (.001 == 0.1%)

Returns

\Elastica\Query\Common

custom_filters_score()

custom_filters_score() 

custom filters score query.

custom_score()

custom_score() 

custom score query.

custom_boost_factor()

custom_boost_factor() 

custom boost factor query.

fuzzy_like_this()

fuzzy_like_this() : \Elastica\QueryBuilder\DSL\FuzzyLikeThis

fuzzy like this query.

Returns

\Elastica\QueryBuilder\DSL\FuzzyLikeThis

fuzzy_like_this_field()

fuzzy_like_this_field() 

fuzzy like this field query.

fuzzy()

fuzzy(string  $fieldName = null, string  $value = null) : \Elastica\Query\Fuzzy

fuzzy query.

Parameters

string $fieldName

Field name

string $value

String to search for

Returns

\Elastica\Query\Fuzzy

geo_shape()

geo_shape() 

geo shape query.

ids()

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

ids query.

Parameters

array|string|\Elastica\Type $type
array $ids

Returns

\Elastica\Query\Ids

indices()

indices() 

indices query.

more_like_this_field()

more_like_this_field() 

more_like_this_field query.

prefix()

prefix(array  $prefix = array()) : \Elastica\Query\Prefix

prefix query.

Parameters

array $prefix

Prefix array

Returns

\Elastica\Query\Prefix

query_string()

query_string(string  $queryString = '') : \Elastica\Query\QueryString

query string query.

Parameters

string $queryString

OPTIONAL Query string for object

Returns

\Elastica\Query\QueryString

simple_query_string()

simple_query_string(string  $query, array  $fields = array()) : \Elastica\Query\SimpleQueryString

simple_query_string query.

Parameters

string $query
array $fields

Returns

\Elastica\Query\SimpleQueryString

range()

range(string  $fieldName = null, array  $args = array()) : \Elastica\Query\Range

range query.

Parameters

string $fieldName
array $args

Returns

\Elastica\Query\Range

regexp()

regexp(string  $key = '', string  $value = null, float  $boost = 1.0) : \Elastica\Query\Regexp

regexp query.

Parameters

string $key
string $value
float $boost

Returns

\Elastica\Query\Regexp

span_first()

span_first() 

span first query.

span_multi_term()

span_multi_term() 

span multi term query.

span_near()

span_near() 

span near query.

span_not()

span_not() 

span not query.

span_or()

span_or() 

span or query.

span_term()

span_term() 

span term query.

term()

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

term query.

Parameters

array $term

Returns

\Elastica\Query\Term

terms()

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

terms query.

Parameters

string $key
array $terms

Returns

\Elastica\Query\Terms

wildcard()

wildcard(string  $key = '', string  $value = null, float  $boost = 1.0) : \Elastica\Query\Wildcard

wildcard query.

Parameters

string $key

OPTIONAL Wildcard key

string $value

OPTIONAL Wildcard value

float $boost

OPTIONAL Boost value (default = 1)

Returns

\Elastica\Query\Wildcard

minimum_should_match()

minimum_should_match() 

minimum should match query.

template()

template() 

template query.

geo_distance()

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

geo distance query.

Parameters

string $key
array|string $location
string $distance

Returns

\Elastica\Query\GeoDistance