PHP Class Elastica\Query\BoolQuery

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

Public Methods

Method Description
addFilter ( AbstractQuery $filter ) Sets the filter.
addMust ( Elastica\Query\AbstractQuery | array $args ) Add must part to query.
addMustNot ( Elastica\Query\AbstractQuery | array $args ) Add must not part to query.
addShould ( Elastica\Query\AbstractQuery | array $args ) Add should part to query.
setBoost ( float $boost ) Sets boost value of this query.
setMinimumNumberShouldMatch ( integer $minimumNumberShouldMatch ) Set the minimum number of of should match.
toArray ( ) : array Converts array to an object in case no queries are added.

Protected Methods

Method Description
_addQuery ( string $type, Elastica\Query\AbstractQuery | array $args ) Adds a query to the current object.

Method Details

_addQuery() protected method

Adds a query to the current object.
protected _addQuery ( string $type, Elastica\Query\AbstractQuery | array $args )
$type string Query type
$args Elastica\Query\AbstractQuery | array Query

addFilter() public method

Sets the filter.
public addFilter ( AbstractQuery $filter )
$filter AbstractQuery Filter object

addMust() public method

Add must part to query.
public addMust ( Elastica\Query\AbstractQuery | array $args )
$args Elastica\Query\AbstractQuery | array Must query

addMustNot() public method

Add must not part to query.
public addMustNot ( Elastica\Query\AbstractQuery | array $args )
$args Elastica\Query\AbstractQuery | array Must not query

addShould() public method

Add should part to query.
public addShould ( Elastica\Query\AbstractQuery | array $args )
$args Elastica\Query\AbstractQuery | array Should query

setBoost() public method

Sets boost value of this query.
public setBoost ( float $boost )
$boost float Boost value

setMinimumNumberShouldMatch() public method

Set the minimum number of of should match.
public setMinimumNumberShouldMatch ( integer $minimumNumberShouldMatch )
$minimumNumberShouldMatch integer Should match minimum

toArray() public method

Converts array to an object in case no queries are added.
public toArray ( ) : array
return array