include/SugarSearchEngine/Elastic/Elastica/Query/Bool.php

Show: inherited
Table of Contents

Bool query

Author
Nicolas Ruflin  
Category
Xodoa  
Link
http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/bool_query/  
Package
Elastica  
Uses
\Elastica_Query_Abstract  

\Elastica_Query_Bool

Package: Elastica

Bool query

This function can be used to handle params for queries, filter, facets

Parent(s)
\Elastica_Query_Abstract < \Elastica_Param
Author
Nicolas Ruflin  
Category
Xodoa  
Link
http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/bool_query/  
Uses
\Elastica_Query_Abstract  

Properties

Propertyprotectedarray  $_params= 'array()'
Default valuearray()Details
Type
array
Inherited_from
\Elastica_Param::$$_params  
Inherited_from
\Elastica_Query_Abstract::$$_params  
Propertyprotected  $_rawParams= 'array()'
Default valuearray()Details
Type
n/a
Inherited_from
\Elastica_Param::$$_rawParams  
Inherited_from
\Elastica_Query_Abstract::$$_rawParams  

Methods

methodprotected_addQuery( string $type, \Elastica_Query_Abstract | array $args ) : void

Adds a query to the current object

Parameters
Name Type Description
$type string

Query type

$args \Elastica_Query_Abstract | array

Query

Throws
Exception Description
\Elastica_Exception_Invalid If not valid query
methodprotected_setRawParam( string $key, mixed $value ) : \Elastica_Param
inherited

Sets params not inside params array

Inherited from: \Elastica_Param::_setRawParam()\Elastica_Query_Abstract::_setRawParam()
Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\Elastica_Param
methodpublicaddMust( \Elastica_Query_Abstract | array $args ) : \Elastica_Query_Bool

Add must part to query

Parameters
Name Type Description
$args \Elastica_Query_Abstract | array

Must query

Returns
Type Description
\Elastica_Query_Bool Current object
methodpublicaddMustNot( \Elastica_Query_Abstract | array $args ) : \Elastica_Query_Bool

Add must not part to query

Parameters
Name Type Description
$args \Elastica_Query_Abstract | array

Must not query

Returns
Type Description
\Elastica_Query_Bool Current object
methodpublicaddParam( string $key, mixed $value ) : \Elastica_Param
inherited

Adds a param to the list

Inherited from: \Elastica_Param::addParam()\Elastica_Query_Abstract::addParam()

This function can be used to add an array of params

Parameters
Name Type Description
$key string

Param key

$value mixed

Value to set

Returns
Type Description
\Elastica_Param
methodpublicaddShould( \Elastica_Query_Abstract | array $args ) : \Elastica_Query_Bool

Add should part to query

Parameters
Name Type Description
$args \Elastica_Query_Abstract | array

Should query

Returns
Type Description
\Elastica_Query_Bool Current object
methodpublicgetParam( string $key ) : mixed
inherited

Returns a specific param

Inherited from: \Elastica_Param::getParam()\Elastica_Query_Abstract::getParam()
Parameters
Name Type Description
$key string

Key to return

Returns
Type Description
mixed Key value
Throws
Exception Description
\Elastica_Exception_Invalid If requested key is not set
methodpublicgetParams( ) : array
inherited

Returns the params array

Inherited from: \Elastica_Param::getParams()\Elastica_Query_Abstract::getParams()
Returns
Type Description
array Params
methodpublicsetBoost( float $boost ) : \Elastica_Query_Bool

Sets boost value of this query

Parameters
Name Type Description
$boost float

Boost value

Returns
Type Description
\Elastica_Query_Bool Current object
methodpublicsetMinimumNumberShouldMatch( int $minimumNumberShouldMatch ) : \Elastica_Query_Bool

Set the minimum number of of should match

Parameters
Name Type Description
$minimumNumberShouldMatch int

Should match minimum

Returns
Type Description
\Elastica_Query_Bool Current object
methodpublicsetParam( string $key, mixed $value ) : void
inherited

Sets (overwrites) the value at the given key

Inherited from: \Elastica_Param::setParam()\Elastica_Query_Abstract::setParam()
Parameters
Name Type Description
$key string

Key to set

$value mixed

Key Value

methodpublicsetParams( array $params ) : \Elastica_Param
inherited

Sets (overwrites) all params of this object

Inherited from: \Elastica_Param::setParams()\Elastica_Query_Abstract::setParams()
Parameters
Name Type Description
$params array

Parameter list

Returns
Type Description
\Elastica_Param
methodpublictoArray( ) : array
inherited

Converts the params to an array. A default implementation exist to create the an array out of the class name (last part of the class name) and the params

Inherited from: \Elastica_Param::toArray()\Elastica_Query_Abstract::toArray()
Returns
Type Description
array Filter array
Documentation was generated by DocBlox 0.18.1.