PHP Class Elastica\Query\Prefix

Inheritance: extends AbstractQuery
Show file Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
__construct ( array $prefix = [] ) Constructs the Prefix query object.
setPrefix ( string $key, string | array $value, float $boost = 1 ) Adds a prefix to the prefix query.
setRawPrefix ( array $prefix ) setRawPrefix can be used instead of setPrefix if some more special values for a prefix have to be set.

Method Details

__construct() public method

Constructs the Prefix query object.
public __construct ( array $prefix = [] )
$prefix array OPTIONAL Calls setRawPrefix with the given $prefix array

setPrefix() public method

Adds a prefix to the prefix query.
public setPrefix ( 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)

setRawPrefix() public method

setRawPrefix can be used instead of setPrefix if some more special values for a prefix have to be set.
public setRawPrefix ( array $prefix )
$prefix array Prefix array