PHP Class Elastica\Query\Term

Inheritance: extends AbstractQuery
Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
__construct ( array $term = [] ) Constructs the Term query object.
setRawTerm ( array $term ) Set term can be used instead of addTerm if some more special values for a term have to be set.
setTerm ( string $key, string | array $value, float $boost = 1 ) Adds a term to the term query.

Method Details

__construct() public method

Constructs the Term query object.
public __construct ( array $term = [] )
$term array OPTIONAL Calls setTerm with the given $term array

setRawTerm() public method

Set term can be used instead of addTerm if some more special values for a term have to be set.
public setRawTerm ( array $term )
$term array Term array

setTerm() public method

Adds a term to the term query.
public setTerm ( string $key, string | array $value, float $boost = 1 )
$key string Key to query
$value string | array Values(s) for the query. Boost can be set with array
$boost float OPTIONAL Boost value (default = 1.0)