include/SugarSearchEngine/Elastic/Elastica/Query/HasChild.php
Returns parent documents having child docs matching the query
- Author
- Fabian Vogler
- Category
- Xodoa
- Link
- http://www.elasticsearch.org/guide/reference/query-dsl/has-child-query.html
- Package
- Elastica
- Uses
- \Elastica_Query_Abstract
\Elastica_Query_HasChild
Returns parent documents having child docs matching the query
This function can be used to handle params for queries, filter, facets
- Parent(s)
- \Elastica_Query_Abstract < \Elastica_Param
- Author
- Fabian Vogler
- Category
- Xodoa
- Link
- http://www.elasticsearch.org/guide/reference/query-dsl/has-child-query.html
- 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
__construct(
string | \Elastica_Query $query, string $type
=
null
)
:
void
Name | Type | Description |
---|---|---|
$query | string | \Elastica_Query | Query string or a Elastica_Query object |
$type | string | Parent document type |
_setRawParam(
string $key, mixed $value
)
:
\Elastica_Param
Sets 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 |
addParam(
string $key, mixed $value
)
:
\Elastica_Param
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
Name | Type | Description |
---|---|---|
$key | string | Param key |
$value | mixed | Value to set |
Type | Description |
---|---|
\Elastica_Param |
getParam(
string $key
)
:
mixed
Returns 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(
)
:
array
Returns the params array
Inherited from: \Elastica_Param::getParams()\Elastica_Query_Abstract::getParams()Type | Description |
---|---|
array | Params |
setParam(
string $key, mixed $value
)
:
void
Sets (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_Param
Sets (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 |
setQuery(
string | \Elastica_Query | \Elastica_Query_Abstract $query
)
:
\Elastica_Query_HasChild
Sets query object
Name | Type | Description |
---|---|---|
$query | string | \Elastica_Query | \Elastica_Query_Abstract |
Type | Description |
---|---|
\Elastica_Query_HasChild |
setType(
string $type
)
:
\Elastica_Query_HasChild
Set type of the parent document
Name | Type | Description |
---|---|---|
$type | string | Parent document type |
Type | Description |
---|---|
\Elastica_Query_HasChild | Current object |
toArray(
)
:
array
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()Type | Description |
---|---|
array | Filter array |