include/SugarSearchEngine/Elastic/Elastica/Query/Ids.php
Ids Query
- Author
- Lee Parker
- Author
- Nicolas Ruflin
- Author
- Tim Rupp
- Category
- Xodoa
- Link
- http://www.elasticsearch.org/guide/reference/query-dsl/ids-query.html
- Package
- Elastica
- Uses
- \Elastica_Query_Abstract
\Elastica_Query_Ids
Package: Elastica
Parameters
Returns
Ids Query
This function can be used to handle params for queries, filter, facets
- Parent(s)
- \Elastica_Query_Abstract < \Elastica_Param
- Author
- Lee Parker
- Author
- Nicolas Ruflin
- Author
- Tim Rupp
- Category
- Xodoa
- Link
- http://www.elasticsearch.org/guide/reference/query-dsl/ids-query.html
- Uses
- \Elastica_Query_Abstract
Properties
$_rawParams= 'array()'
Default value
array()
Details- Type
- n/a
- Inherited_from
- \Elastica_Param::$$_rawParams
- Inherited_from
- \Elastica_Query_Abstract::$$_rawParams
Methods
__construct(
string | \Elastica_Type $type
=
null, array $ids
=
array()
)
:
void
Creates filter object
Parameters
Name | Type | Description |
---|---|---|
$type | string | \Elastica_Type | Type to filter on |
$ids | array | List of ids |
_setRawParam(
string $key, mixed $value
)
:
\Elastica_Param
inherited
Sets params not inside params array
Inherited from: \Elastica_Param::_setRawParam()\Elastica_Query_Abstract::_setRawParam()
Parameters
Returns
Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Type | Description |
---|---|
\Elastica_Param |
addId(
string $id
)
:
\Elastica_Query_Ids
Adds one more filter to the and filter
Parameters
Returns
Name | Type | Description |
---|---|---|
$id | string | Adds id to filter |
Type | Description |
---|---|
\Elastica_Query_Ids | Current object |
addParam(
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
Name | Type | Description |
---|---|---|
$key | string | Param key |
$value | mixed | Value to set |
Type | Description |
---|---|
\Elastica_Param |
addType(
string $type
)
:
\Elastica_Query_Ids
Adds one more type to query
Parameters
Returns
Name | Type | Description |
---|---|---|
$type | string | Adds type to query |
Type | Description |
---|---|
\Elastica_Query_Ids | Current object |
getParam(
string $key
)
:
mixed
inherited
Returns a specific param
Inherited from: \Elastica_Param::getParam()\Elastica_Query_Abstract::getParam()
Parameters
Returns
Throws
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
inherited
Returns the params array
Inherited from: \Elastica_Param::getParams()\Elastica_Query_Abstract::getParams()
Returns
Type | Description |
---|---|
array | Params |
setIds(
array | string $ids
)
:
\Elastica_Query_Ids
Sets the ids to filter
Parameters
Returns
Name | Type | Description |
---|---|---|
$ids | array | string | List of ids |
Type | Description |
---|---|
\Elastica_Query_Ids | Current object |
setParam(
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 |
setParams(
array $params
)
:
\Elastica_Param
inherited
Sets (overwrites) all params of this object
Inherited from: \Elastica_Param::setParams()\Elastica_Query_Abstract::setParams()
Parameters
Returns
Name | Type | Description |
---|---|---|
$params | array | Parameter list |
Type | Description |
---|---|
\Elastica_Param |
setType(
string | \Elastica_Type $type
)
:
\Elastica_Query_Ids
Parameters
Returns
Name | Type | Description |
---|---|---|
$type | string | \Elastica_Type | Type name or object |
Type | Description |
---|---|
\Elastica_Query_Ids | Current object |