include/SugarSearchEngine/Elastic/Elastica/Query/Bool.php
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
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

array
$_params= 'array()'
array()Details- Type
- array
- Inherited_from
- \Elastica_Param::$$_params
- Inherited_from
- \Elastica_Query_Abstract::$$_params

$_rawParams= 'array()'
array()Details- Type
- n/a
- Inherited_from
- \Elastica_Param::$$_rawParams
- Inherited_from
- \Elastica_Query_Abstract::$$_rawParams
Methods

_addQuery(
string $type, \Elastica_Query_Abstract | array $args
)
:
voidAdds a query to the current object
| Name | Type | Description |
|---|---|---|
| $type | string | Query type |
| $args | \Elastica_Query_Abstract | array | Query |
| Exception | Description |
|---|---|
| \Elastica_Exception_Invalid | If not valid query |

_setRawParam(
string $key, mixed $value
)
:
\Elastica_ParamSets params not inside params array
Inherited from: \Elastica_Param::_setRawParam()\Elastica_Query_Abstract::_setRawParam()| Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
| Type | Description |
|---|---|
| \Elastica_Param |

addMust(
\Elastica_Query_Abstract | array $args
)
:
\Elastica_Query_BoolAdd must part to query
| Name | Type | Description |
|---|---|---|
| $args | \Elastica_Query_Abstract | array | Must query |
| Type | Description |
|---|---|
| \Elastica_Query_Bool | Current object |

addMustNot(
\Elastica_Query_Abstract | array $args
)
:
\Elastica_Query_BoolAdd must not part to query
| Name | Type | Description |
|---|---|---|
| $args | \Elastica_Query_Abstract | array | Must not query |
| Type | Description |
|---|---|
| \Elastica_Query_Bool | Current object |

addParam(
string $key, mixed $value
)
:
\Elastica_ParamAdds 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
| Name | Type | Description |
|---|---|---|
| $key | string | Param key |
| $value | mixed | Value to set |
| Type | Description |
|---|---|
| \Elastica_Param |

addShould(
\Elastica_Query_Abstract | array $args
)
:
\Elastica_Query_BoolAdd should part to query
| Name | Type | Description |
|---|---|---|
| $args | \Elastica_Query_Abstract | array | Should query |
| Type | Description |
|---|---|
| \Elastica_Query_Bool | Current object |

getParam(
string $key
)
:
mixedReturns a specific param
Inherited from: \Elastica_Param::getParam()\Elastica_Query_Abstract::getParam()| Name | Type | Description |
|---|---|---|
| $key | string | Key to return |
| Type | Description |
|---|---|
| mixed | Key value |
| Exception | Description |
|---|---|
| \Elastica_Exception_Invalid | If requested key is not set |

getParams(
)
:
arrayReturns the params array
Inherited from: \Elastica_Param::getParams()\Elastica_Query_Abstract::getParams()| Type | Description |
|---|---|
| array | Params |

setBoost(
float $boost
)
:
\Elastica_Query_BoolSets boost value of this query
| Name | Type | Description |
|---|---|---|
| $boost | float | Boost value |
| Type | Description |
|---|---|
| \Elastica_Query_Bool | Current object |

setMinimumNumberShouldMatch(
int $minimumNumberShouldMatch
)
:
\Elastica_Query_BoolSet the minimum number of of should match
| Name | Type | Description |
|---|---|---|
| $minimumNumberShouldMatch | int | Should match minimum |
| Type | Description |
|---|---|
| \Elastica_Query_Bool | Current object |

setParam(
string $key, mixed $value
)
:
voidSets (overwrites) the value at the given key
Inherited from: \Elastica_Param::setParam()\Elastica_Query_Abstract::setParam()| Name | Type | Description |
|---|---|---|
| $key | string | Key to set |
| $value | mixed | Key Value |

setParams(
array $params
)
:
\Elastica_ParamSets (overwrites) all params of this object
Inherited from: \Elastica_Param::setParams()\Elastica_Query_Abstract::setParams()| Name | Type | Description |
|---|---|---|
| $params | array | Parameter list |
| Type | Description |
|---|---|
| \Elastica_Param |

toArray(
)
:
arrayConverts 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()| Type | Description |
|---|---|
| array | Filter array |