BREAKING_CHANGES.md 0000644 00000011045 14221060012 0007365 0 ustar 00 # 8.0
This major release is a complete new PHP client for Elasticsearch. We build it from scratch!
We tried to reduce the BC breaks as much as possible but there are some (big) differences:
## Architectural changes:
- we changed the namespace, now everything is under `Elastic\Elasticsearch`
- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library for HTTP communications;
- we changed the `Exception` model, using the namespace `Elastic\Elasticsearch\Exception`. All the exceptions extends the
`ElasticsearchException` interface, as in 7.x
- we changed the response type of each endpoints using an [Elasticsearch](src/Response/Elasticsearch.php) response class.
This class wraps a a [PSR-7](https://www.php-fig.org/psr/psr-7/) response allowing the access of the body response
as array or object. This means you can access the API response as in 7.x, no BC break here! :angel:
- we changed the `ConnectionPool` in `NodePool`. The `connection` naming was ambigous since the objects are nodes (hosts)
## Specific changes:
The following functions has been removed:
- `ClientBuilder::getEndpoint()`
- `ClientBuilder::getRegisteredNamespacesBuilders()`
- `ClientBuilder::getRegisteredNamespacesBuilders()`
- `ClientBuilder::defaultHandler()`
- `ClientBuilder::multiHandler()`
- `ClientBuilder::singleHandler()`
- `ClientBuilder::setConnectionFactory()`
- `ClientBuilder::setConnectionPool()`, you can use `ClientBuilder::setNodePool` instead
- `ClientBuilder::setEndpoint()`
- `ClientBuilder::registerNamespace()`
- `ClientBuilder::setTransport()`, you can specify an HTTP PSR-18 client using `ClientBuilder::setHttpClient()`
- `ClientBuilder::setHandler()`
- `ClientBuilder::setTracer()`, you can only set a Logger using `ClientBuilder::setLogger()`
- `ClientBuilder::setSerializer()`
- `ClientBuilder::setConnectionParams()`, you can use `ClientBuilder::setHttpClientOptions()` instead
- `ClientBuilder::setSelector()`, you can set a `Selector` using the `setNodePool`, see [here](https://github.com/elastic/elastic-transport-php/blob/8.x/README.md#use-a-custom-selector) for more information
- `ClientBuilder::setSniffOnStart()`
- `ClientBuilder::includePortInHostHeader()`
We removed the special `client` parameter passed in `$params` endpoints. In details:
- `$params['client']['never_retry']`
- `$params['client']['verbose']`
- `$params['client']['port_in_header']`
- `$params['client']['future']`, you can set HTTP async using `Client::setAsync(true)`
- `$params['client']['ignore']`, you can disable the Exception using `Client::setResponseException(false)`
# 7.17
- We changed the signature of `Elasticsearch\Common\EmptyLogger::log` adding the `void` return type.
This change has been needed to support psr/log v3.
# 7.4
- Using a deprecated parameter is notified triggering a [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php)
error (e.g. using the `type` parameter will generate a `Specifying types in urls has been deprecated`
deprecation message).
- When `delete` with an empty `id` an `Elasticsearch\Common\Exceptions\RuntimeException\Missing404Exception`
exception is thrown. Previously it was a `Elasticsearch\Common\Exceptions\RuntimeException\InvalidArgumentException`.
# 7.0
- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
See [PHP supported version](https://www.php.net/supported-versions.php) for
more information.
- Elasticsearch 7.0 deprecated APIs that accept types, introduced new typeless
APIs, and removed support for the _default_ mapping. Read [this](https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0)
blog post for more information.
- Added type hints and return type declarations where possible
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
# 6.7
- `{type}` part in `indices.put_mapping` API is not required anymore, see new specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json)
# 6.0
- [Search Templates]: PutTemplate endpoint has been removed (see [Elasticsearch Breaking Changes](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_scripting_changes.html#_stored_search_template_apis_removed)),
use PutScript instead.
- [#674](https://github.com/elastic/elasticsearch-php/pull/674) `ClientBuilder::defaultLogger()` method was removed. It is recommended to [create the logger object manually](https://github.com/elastic/elasticsearch-php/blob/master/docs/configuration.asciidoc#enabling-the-logger).
CHANGELOG.md 0000644 00000073575 14221060012 0006362 0 ustar 00 ## Release 8.0.1
- Fixed `NoNodeAvailableException` exception in endpoints
[e7d448d](https://github.com/elastic/elasticsearch-php/commit/e7d448d540f120eb3a3e3fe0d5866bf62fb67f3a)
## Release 8.0.0
- Finally released 8.0.0 GA.
## Release 8.0.0-rc2
- Added the common parameters in all the endpoints
[6427f8c](https://github.com/elastic/elasticsearch-php/commit/6427f8c42ba2afbe82c00adffdf93dd60b439432)
## Release 8.0.0-rc1
- Fixed query string in API endpoints + added a first integration test
[e404235](https://github.com/elastic/elasticsearch-php/commit/e404235890b53a99242f7fc5ddea6ee6b2459e8f)
- Added AdapterOptions class and setNodePool() in ClientBuilder
[9150f71](https://github.com/elastic/elasticsearch-php/commit/9150f717488ddb74d83a119d215c0584aa98c95a)
- Fixed urlencode in params, Exception in test code generation
[142327b](https://github.com/elastic/elasticsearch-php/commit/142327b3cb730042ec0b21b7c6076164bb0721ed)
- Improved client/server response exception messages
[50de3e6](https://github.com/elastic/elasticsearch-php/commit/50de3e60fc9b0167a948a992fda78bc5e1a42152)
## Release 8.0.0-alpha
First alpha release of elasticsearch-php 8.0.0.
This major release is a complete new PHP client for Elasticsearch. We build it from scratch!
We tried to reduce the BC breaks as much as possible but there are some (big) differences:
### Architectural changes:
- we changed the namespace, now everything is under `Elastic\Elasticsearch`
- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library for HTTP communications;
- we changed the `Exception` model, using the namespace `Elastic\Elasticsearch\Exception`. All the exceptions extends the
`ElasticsearchException` interface, as in 7.x
- we changed the response type of each endpoints using an [Elasticsearch](src/Response/Elasticsearch.php) response class.
This class wraps a a [PSR-7](https://www.php-fig.org/psr/psr-7/) response allowing the access of the body response
as array or object. This means you can access the API response as in 7.x, no BC break here! :angel:
- we changed the `ConnectionPool` in `NodePool`. The `connection` naming was ambigous since the objects are nodes (hosts)
You can have a look at the [BREAKING_CHANGES](BREAKING_CHANGES.md) file for more information.
## Release 7.17.0
- Allow psr/log v3
[#1184](https://github.com/elastic/elasticsearch-php/pull/1184)
## Release 7.16.0
- Added support of includePortInHostHeader in ClientBuilder::fromConfig
[#1181](https://github.com/elastic/elasticsearch-php/pull/1181)
- Fixed UTF-16 issue in SmartSerializer with single unpaired surrogate in unicode escape
[#1179](https://github.com/elastic/elasticsearch-php/pull/1179)
- Replace trait with abstract class to avoid Deprecated Functionality issue in PHP 8.1
[#1175](https://github.com/elastic/elasticsearch-php/pull/1175)
## Release 7.15.0
- Updated endpoints for Elasticsearch 7.15.0
[995f6d4](https://github.com/elastic/elasticsearch-php/commit/995f6d4bde7de76004e95d7a434b1d59da7a7e75)
## Release 7.14.0
- Usage of psr/log version 2
[#1154](https://github.com/elastic/elasticsearch-php/pull/1154)
- Update search iterators to send `scroll_id` inside the request body
[#1134](https://github.com/elastic/elasticsearch-php/pull/1134)
- Added the `ingest.geoip.downloader.enabled=false` setting for ES
[5867351](https://github.com/elastic/elasticsearch-php/commit/586735109dc18f22bfdf3b73ab0621b37e857be1)
- Removed phpcs for autogenerated files (endpoints)
[651c57b](https://github.com/elastic/elasticsearch-php/commit/651c57b2e6bf98a0fd48220949966e630e5a804a)
## Release 7.13.1
- Added port in url for trace and logger messages
[#1126](https://github.com/elastic/elasticsearch-php/pull/1126)
## Release 7.13.0
- (DOCS) Added the HTTP meta data section
[#1143](https://github.com/elastic/elasticsearch-php/pull/1143)
- Added support for API Compatibility Header
[#1142](https://github.com/elastic/elasticsearch-php/pull/1142)
- (DOCS) Added Helpers section to PHP book
[#1129](https://github.com/elastic/elasticsearch-php/pull/1129)
- Added the API description in phpdoc section for each endpoint
[9e05c81](https://github.com/elastic/elasticsearch-php/commit/9e05c8108b638b60cc676b6a4f4be97c7df9eb64)
- Usage of PHPUnit 9 only + migrated xml configurations
[038b5dd](https://github.com/elastic/elasticsearch-php/commit/038b5dd043dc76b20b9f5f265ea914a38d33568d)
## Release 7.12.0
- Updated the endpoints for ES 7.12 + removed cpliakas/git-wrapper
in favor of symplify/git-wrapper
[136d5b9](https://github.com/elastic/elasticsearch-php/commit/136d5b9717b3806c6b34ef8a5076bfe7cee8b46e)
- Fixed warning header as array in YAML tests generator
[0d81be1](https://github.com/elastic/elasticsearch-php/commit/0d81be131bfc7eff6ef82468e61c16077a892aab)
- Refactored TEST_SUITE with free, platinum + removed old YamlRunnerTest
[f69d96f](https://github.com/elastic/elasticsearch-php/commit/f69d96fc283580177002b4088c279c3d0c07befe)
## Release 7.11.0
- Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud
and can be disabled with `ClientBuilder::setElasticMetaHeader(false)`
[#1089](https://github.com/elastic/elasticsearch-php/pull/1089)
- Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8
compatibility
[#1075](https://github.com/elastic/elasticsearch-php/pull/1075)
- Remove unnecessary `InvalidArgumentExceptions`
[#1069](https://github.com/elastic/elasticsearch-php/pull/1069)
- Introducing PHP 8 compatibility
[#1063](https://github.com/elastic/elasticsearch-php/pull/1063)
- Replace Sami by Doctum and fix `.gitignore`
[#1062](https://github.com/elastic/elasticsearch-php/pull/1062)
## Release 7.10.0
- Updated endpoints and namespaces for Elasticsearch 7.10
[3ceb748](https://github.com/elastic/elasticsearch-php/commit/3ceb7484a111aa20126168460c79f098c4fe0792)
- Fixed ClientBuilder::fromConfig allowing multiple function
parameters (e.g. setApiKey)
[#1076](https://github.com/elastic/elasticsearch-php/pull/1076)
- Refactored the YAML tests using generated PHPUnit code
[85fadc2](https://github.com/elastic/elasticsearch-php/commit/85fadc2bd4b2b309b19761a50ff13010d43a524d)
## Release 7.9.1
- Fixed using object instead of array in onFailure transport event
[#1066](https://github.com/elastic/elasticsearch-php/pull/1066)
- Fixed reset custom header after endpoint call
[#1065](https://github.com/elastic/elasticsearch-php/pull/1065)
- Show generic error messages when server returns no response
[#1056](https://github.com/elastic/elasticsearch-php/pull/1056)
## Release 7.9.0
- Updated endpoints and namespaces for Elasticsearch 7.9
[28bf0ed](https://github.com/elastic/elasticsearch-php/commit/28bf0ed6df6bc95f83f369509431d97907bfdeb0)
- Moved `scroll_id` into `body` for search operations in the documentation
[#1052](https://github.com/elastic/elasticsearch-php/pull/1052)
- Fixed PHP 7.4 preloading feature for autoload.php
[#1051](https://github.com/elastic/elasticsearch-php/pull/1051)
- Improved message of JSON errors using `json_last_error_msg()`
[#1045](https://github.com/elastic/elasticsearch-php/pull/1045)
## Release 7.8.0
- Updated endpoints and namespaces for Elasticsearch 7.8
[f2a0828](https://github.com/elastic/elasticsearch-php/commit/f2a0828d5ee9d126ad63e2a1d43f70b4013845e2)
- Improved documentation
[#1038](https://github.com/elastic/elasticsearch-php/pull/1038)
[#1027](https://github.com/elastic/elasticsearch-php/pull/1027)
[#1025](https://github.com/elastic/elasticsearch-php/pull/1025)
## Release 7.7.0
- Removed setId() into endpoints, fixed `util/GenerateEndpoints.php`
[#1026](https://github.com/elastic/elasticsearch-php/pull/1026)
- Fixes JsonErrorException with code instead of message
[#1022](https://github.com/elastic/elasticsearch-php/pull/1022)
- Better exception message for Could not parse URI
[#1016](https://github.com/elastic/elasticsearch-php/pull/1016)
- Added JUnit log for PHPUnit
[88b7e1c](https://github.com/elastic/elasticsearch-php/commit/88b7e1ce80a5a52c1d64d00c55fef77097bbd8a9)
- Added the XPack endpoints
[763d91a](https://github.com/elastic/elasticsearch-php/commit/763d91a3d506075316b84a38b2bed7a098da5028)
## Release 7.6.1
- Fixed issue with `guzzlehttp/ringphp` and `guzzle/streams`
using forks `ezimuel/ringphp` and `ezimuel/guzzlestreams`
[92a6a4a](https://github.com/elastic/elasticsearch-php/commit/92a6a4adda5eafd1823c7c9c386e2c7e5e75cd08)
## Release 7.6.0
- Generated the new endpoints for Elasticsearch 7.6.0
[be31f31](https://github.com/elastic/elasticsearch-php/commit/be31f317af704f333b43bbcc7c01ddc7c91ec6f8)
## Release 7.5.1
- Fixes port missing in log [#925](https://github.com/elastic/elasticsearch-php/issues/925)
[75e0888](https://github.com/elastic/elasticsearch-php/commit/125594b40d167ef1509b3ee49a3f93426390c426)
- Added `ClientBuilder::includePortInHostHeader()` to add the
`port` in the `Host` header. This fixes [#993](https://github.com/elastic/elasticsearch-php/issues/993).
By default the `port` is not included in the `Host` header.
[#997](https://github.com/elastic/elasticsearch-php/pull/997)
- Replace abandoned packages: ringphp, streams and phpstan-shim
[#996](https://github.com/elastic/elasticsearch-php/pull/996)
- Fixed gzip compression when setting Cloud Id
[#986](https://github.com/elastic/elasticsearch-php/pull/986)
## Release 7.5.0
- Fixed `Client::extractArgument` iterable casting to array;
this allows passing a `Traversable` body for some endpoints
(e.g. Bulk, Msearch, MsearchTemplate)
[#983](https://github.com/elastic/elasticsearch-php/pull/983)
- Fixed the Response Exception if the `reason` field is null
[#980](https://github.com/elastic/elasticsearch-php/pull/980)
- Added support for PHP 7.4
[#976](https://github.com/elastic/elasticsearch-php/pull/976)
## Release 7.4.1
- We added the suppress operator `@` for the deprecation messages `@trigger_error()`.
With this approach we don't break existing application that convert PHP errors in Exception
(e.g. using Laravel with issue https://github.com/babenkoivan/scout-elasticsearch-driver/issues/297)
Using the `@` operator is still possible to intercept the deprecation message using
a custom error handler.
[#973](https://github.com/elastic/elasticsearch-php/pull/973)
- Add missing leading slash in the URL of put mapping endpoint
[#970](https://github.com/elastic/elasticsearch-php/pull/970)
- Fix pre 7.2 endpoint class name with aliases + reapply fix #947.
This PR solved the unexpected BC break introduce in 7.4.0 with the code
generation tool
[#968](https://github.com/elastic/elasticsearch-php/pull/968)
## Release 7.4.0
- Added the code generation for endpoints and namespaces based on
the [REST API specification](https://github.com/elastic/elasticsearch/tree/v7.4.2/rest-api-spec/src/main/resources/rest-api-spec/api)
of Elasticsearch. This tool is available in `util/GenerateEndpoints.php`.
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- Fixed the asciidoc [endpoints documentation](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/ElasticsearchPHP_Endpoints.html) based on the code generation
using [Sami](https://github.com/FriendsOfPHP/Sami) project
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- All the `experimental` and `beta` APIs are now signed with
a `@note` tag in the phpdoc section (e.g. [$client->rankEval()](https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/Client.php)). For more information read the [experimental and beta APIs](docs/experimental-beta-apis.asciidoc)
section in the documentation.
[#966](https://github.com/elastic/elasticsearch-php/pull/966)
- Removed `AlreadyExpiredException` since it has been removed
from Elasticsearch with https://github.com/elastic/elasticsearch/pull/24857
[#954](https://github.com/elastic/elasticsearch-php/pull/954)
## Release 7.3.0
- Added support for simplified access to the `X-Opaque-Id` header
[#952](https://github.com/elastic/elasticsearch-php/pull/952)
- Added the HTTP port in the log messages
[#950](https://github.com/elastic/elasticsearch-php/pull/950)
- Fixed hostname with underscore (ClientBuilder::prependMissingScheme)
[#949](https://github.com/elastic/elasticsearch-php/pull/949)
- Removed unused Monolog in ClientBuilder
[#948](https://github.com/elastic/elasticsearch-php/pull/948)
## Release 7.2.2
- Reintroduced the optional parameter in `Elasticsearch\Namespaces\IndicesNamespace::getAliases()`.
This fixes the BC break introduced in 7.2.0 and 7.2.1.
[#947](https://github.com/elastic/elasticsearch-php/pull/)
## Release 7.2.1
- Reintroduced `Elasticsearch\Namespaces\IndicesNamespace::getAliases()` as proxy
to `IndicesNamespace::getAlias()` to prevent BC breaks. The `getAliases()` is
marked as deprecated and it will be removed from `elasticsearch-php 8.0`
[#943](https://github.com/elastic/elasticsearch-php/pull/943)
### Docs
- Fixed missing put mapping code snippet in code examples
[#938](https://github.com/elastic/elasticsearch-php/pull/938)
# Release 7.2.0
- Updated the API endpoints for working with Elasticsearch 7.2.0:
- added `wait_for_active_shards` parameter to `indices.close` API;
- added `expand_wildcards` parameter to `cluster.health` API;
- added include_unloaded_segments`, `expand_wildcards`, `forbid_closed_indices`
parameters to `indices.stats` API.
[[27d721b]](https://github.com/elastic/elasticsearch-php/pull/933/commits/27d721ba44b8c199388650c5a1c8bd69757229aa)
- Updated the phpdoc parameters for all the API endpoints
[[27d721b]](https://github.com/elastic/elasticsearch-php/pull/933/commits/27d721ba44b8c199388650c5a1c8bd69757229aa)
- Improved the Travis CI speed using cache feature with composer
[#929](https://github.com/elastic/elasticsearch-php/pull/929)
- Fixed `php_uname()` usage checking if it is disabled
[#927](https://github.com/elastic/elasticsearch-php/pull/927)
- Added support of Elastic Cloud ID and API key authentication
[#923](https://github.com/elastic/elasticsearch-php/pull/923)
## Release 7.1.1
- Fixed `ClientBuilder::setSSLVerification()` to accept string or boolean
[#917](https://github.com/elastic/elasticsearch-php/pull/917)
- Fix type hinting for `setBody` in `Elasticsearch\Endpoints\Ingest\Pipeline\Put`
[#913](https://github.com/elastic/elasticsearch-php/pull/913)
## Release 7.1.0
- Added warning log for Elasticsearch response containing the `Warning` header
[#911](https://github.com/elastic/elasticsearch-php/pull/911)
- Fixed #838 hosting company is blocking ports because of `YamlRunnerTest.php`
[#844](https://github.com/elastic/elasticsearch-php/pull/844)
- Specialized inheritance of `NoNodesAvailableException` to extend `ServerErrorResponseException`
instead of the generic `\Exception`
[#607](https://github.com/elastic/elasticsearch-php/pull/607)
- Fixed scroll TTL is extracted but not set as a body param
[#907](https://github.com/elastic/elasticsearch-php/pull/907)
### Testing
- Improved the speed of integration tests removing snapshots delete from `YamlRunnerTest::clean`
[#911](https://github.com/elastic/elasticsearch-php/pull/911)
- Reduced the number of skipping YAML integration tests from 20 to 6
[#911](https://github.com/elastic/elasticsearch-php/pull/911)
### Docs
- Documentation updated for Elasticsearch 7
[#904](https://github.com/elastic/elasticsearch-php/pull/904)
## Release 7.0.2
- Fixed incorrect return type hint when using async requests/futures
[#905](https://github.com/elastic/elasticsearch-php/pull/905)
## Release 7.0.1
- Fixed SniffingConnectionPool removing the return type of Connection::sniff()
[#899](https://github.com/elastic/elasticsearch-php/pull/899)
## Release 7.0.0
- Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019.
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Code refactoring using type hints and return type declarations where possible
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Update vendor libraries (PHPUnit 7.5, Symfony YAML 4.3, etc)
[#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Updated all the API endpoints using the [latest 7.0.0 specs](https://github.com/elastic/elasticsearch/tree/v7.0.0/rest-api-spec/src/main/resources/rest-api-spec/api) of Elasticsearch [#897](https://github.com/elastic/elasticsearch-php/pull/897)
- Added the `User-Agent` in each HTTP request [#898](https://github.com/elastic/elasticsearch-php/pull/898)
- Simplified the logging methods `logRequestFail($request, $response, $exception)`
and `logRequestSuccess($request, $response)` in `Elasticsearch\Connections\Connection`
[#876](https://github.com/elastic/elasticsearch-php/pull/876)
- Fix `json_encode` for unicode(emoji) characters [856](https://github.com/elastic/elasticsearch-php/pull/856)
- Fix HTTP port specification using CURLOPT_PORT, not anymore in the host [782](https://github.com/elastic/elasticsearch-php/pull/782)
## Release 6.7.1
- Added `track_total_hits` in `search` endpoint [0c9ff47](https://github.com/elastic/elasticsearch-php/commit/9f4f0dfa331c4f50d2c88c0068afd3062e6ea353)
## Release 6.7.0
- Removed requirement of `{type}` part in `indices.put_mapping`, see new API specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json)
- Added `seq_no_primary_term` parameter in `bulk` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884)
- Added `include_type_name`, `if_primary_term`, `if_seq_no` in `delete` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884)
- Added `include_type_name` in `get`, `index`, `indices.create`, `indices.field.get`, `indices.get`, `indices.mapping.get`, `indices.mapping.getfield`, `indices.mapping.put`, `indices.rollover`, `indices.template.get`, `indices.template.put` endpoints [#884](https://github.com/elastic/elasticsearch-php/pull/884)
- Added `seq_no_primary_term` in `search` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884)
- Added `if_primary_term', 'if_seq_no`in `update` endpoint [#884](https://github.com/elastic/elasticsearch-php/pull/884)
### Testing
- Fix tests for PHP 7 with ES 6.7 [[5401479](https://github.com/elastic/elasticsearch-php/pull/884/commits/5401479)
### Docs
- [DOCS] Fix doc links in README [[5a1782d]](https://github.com/elastic/elasticsearch-php/pull/884/commits/5a1782d)
## Release 6.5.0
- Remove `_suggest` endpoint, which has disappeared from ES6 [#763](https://github.com/elastic/elasticsearch-php/pull/763)
- Fix `SearchHitIterator` key duplicates [#872](https://github.com/elastic/elasticsearch-php/pull/872)
- Fixing script get and delete by removing `lang` from endpoint url [#814](https://github.com/elastic/elasticsearch-php/pull/814)
- Fix `SearchResponseIterator` is scrolling the first page twice [#871](https://github.com/elastic/elasticsearch-php/pull/871), issue [#595](https://github.com/elastic/elasticsearch-php/issues/595)
### Docs
- [DOCS] Add reference to `parse_url()` for Extended Host Configuration [#778](https://github.com/elastic/elasticsearch-php/pull/778)
- [DOCS] Update php version requirement [#757](https://github.com/elastic/elasticsearch-php/pull/757)
- [DOCS] Update `community.asciidoc`, added `ElasticSearchQueryDSL` project [#749](https://github.com/elastic/elasticsearch-php/pull/749)
- [DOCS] Proper return type array for get method for `IndicesNamespace` [#651](https://github.com/elastic/elasticsearch-php/pull/651)
- [DOCS] Fix full docs link [#862](https://github.com/elastic/elasticsearch-php/pull/862)
- [DOCS] Update breaking-changes.asciidoc, removal of ClientBuilder::defaultLogger() [879](https://github.com/elastic/elasticsearch-php/pull/879)
### Testing
- Fix integration tests using docker [#867](https://github.com/elastic/elasticsearch-php/pull/867)
## Release 6.1.0
- Add 'wait_for_no_initializing_shards' to Cluster\Health whitelist [[98a372c]](http://github.com/elasticsearch/elasticsearch-php/commit/98a372c)
- Add 'wait_for_active_shards' to Indices\Open whitelist [[0275fe5]](http://github.com/elasticsearch/elasticsearch-php/commit/0275fe5)
- Add 'max_concurrent_searches' to msearch whitelist [[5624123]](http://github.com/elasticsearch/elasticsearch-php/commit/5624123)
- Add 'max_concurrent_shard_requests' param to MSearch endpoint [[00800c1]](http://github.com/elasticsearch/elasticsearch-php/commit/00800c1)
- Add ReloadSecureSettings endpoint [[75b32b2]](http://github.com/elasticsearch/elasticsearch-php/commit/75b32b2)
- Remove obsolete Shutdown API [[c75d690]](http://github.com/elasticsearch/elasticsearch-php/commit/c75d690)
- Fix: Restore::setBody() does not throw exceptions (#828) [[a96bb9c]](http://github.com/elasticsearch/elasticsearch-php/commit/a96bb9c)
- Fixed php 7.3 compatibility for elasticsearch 6 (#827) [[77916b2]](http://github.com/elasticsearch/elasticsearch-php/commit/77916b2)
- Fix issue with getting status of respository and snapshots. (#719) [[2d11682]](http://github.com/elasticsearch/elasticsearch-php/commit/2d11682)
- fix DeleteByQuery param white list (#748) [[8d963c6]](http://github.com/elasticsearch/elasticsearch-php/commit/8d963c6)
### Docs
- [Docs] Update elasticsearch version (#743) [[043ad4f]](http://github.com/elasticsearch/elasticsearch-php/commit/043ad4f)
- [DOCS] reuqest → request typo fix (#728) [[68db9f0]](http://github.com/elasticsearch/elasticsearch-php/commit/68db9f0)
- [DOCS] Fix documentation example of upsert (#730) [[805329b]](http://github.com/elasticsearch/elasticsearch-php/commit/805329b)
- [DOCS] Replace deprecated string type with keyword type for index operations (#736) [[a550507]](http://github.com/elasticsearch/elasticsearch-php/commit/a550507)
### Testing
- [TEST] Fix travis untarring [[0106351]](http://github.com/elasticsearch/elasticsearch-php/commit/0106351)
- [TEST] Download artifacts directly, migrate off esvm [[1e9f06c]](http://github.com/elasticsearch/elasticsearch-php/commit/1e9f06c)
- Update Travis Matrix [[aa32b12]](http://github.com/elasticsearch/elasticsearch-php/commit/aa32b12)
- [TEST] Fix teardown in yaml runner [[098030e]](http://github.com/elasticsearch/elasticsearch-php/commit/098030e)
- Add Indices/Split endpoint [[46d5a7a]](http://github.com/elasticsearch/elasticsearch-php/commit/46d5a7a)
- [TEST] Blacklist some bad yml tests [[d5edab7]](http://github.com/elasticsearch/elasticsearch-php/commit/d5edab7)
## Release 6.0.1
- Fix imports [[0106351]](http://github.com/elasticsearch/elasticsearch-php/commit/0106351)
- ClientBuilder: setLogger() and setTracer() only accept \Psr\Log\LoggerInterface (#673) [[0270c4f]](http://github.com/elasticsearch/elasticsearch-php/commit/0270c4f)
- fix for invalid GET /_aliases route. (#663) [[6d467fa]](http://github.com/elasticsearch/elasticsearch-php/commit/6d467fa)
- Remove PutTemplate endpoint, lang param of PutScript no longer used [[a13544f]](http://github.com/elasticsearch/elasticsearch-php/commit/a13544f)
Note: I'm considering PutTemplate removal a bugfix, since the API doesn't exist in ES Core anymore. Using the endpoint throws an error,
so the removal is just fixing an existing bug, hence `6.0.1` instead of `6.1.0`
### Docs
- [DOCS] Add note about separate X-Pack library to README (#694) [[6ffdef8]](http://github.com/elasticsearch/elasticsearch-php/commit/6ffdef8)
- [DOCS] add link to community index helper (#681) [[644f7f7]](http://github.com/elasticsearch/elasticsearch-php/commit/644f7f7)
- [DOCS] Add missing content for breaking changes page [[5a515ac]](http://github.com/elasticsearch/elasticsearch-php/commit/5a515ac)
- [DOCS] update autogenerated api docs [[7f2cd0b]](http://github.com/elasticsearch/elasticsearch-php/commit/7f2cd0b)
- [DOCS] Update version tables [[b824bb7]](http://github.com/elasticsearch/elasticsearch-php/commit/b824bb7)
## Release 6.0.0
- Add Ingest\ProcessorGrok endpoint [[800b1ec]](http://github.com/elasticsearch/elasticsearch-php/commit/800b1ec)
- Add Cluster\RemoteInfo endoint [[dfd8c3c]](http://github.com/elasticsearch/elasticsearch-php/commit/dfd8c3c)
- Add Unauthorized401Exception [[cc68efd]](http://github.com/elasticsearch/elasticsearch-php/commit/cc68efd)
- Add verify as acceptable query string parameter for createRepository (#665) [[885bfea]](http://github.com/elasticsearch/elasticsearch-php/commit/885bfea)
- Fix parsing of NodesInfo for Sniffing [[e22f67f]](http://github.com/elasticsearch/elasticsearch-php/commit/e22f67f)
- Do not schedule connection pool checks on 4xx level errors [[fd75e99]](http://github.com/elasticsearch/elasticsearch-php/commit/fd75e99)
- Add 'terminate_after' to Count endpoint whitelist (#634) [[c3cacd7]](http://github.com/elasticsearch/elasticsearch-php/commit/c3cacd7)
### Docs
- [DOCS] Flip Branch / PHP Version table (#656) [[fa7bfb3]](http://github.com/elasticsearch/elasticsearch-php/commit/fa7bfb3)
### Testing
- [TEST] use proper TestCase parent clsas [[766b440]](http://github.com/elasticsearch/elasticsearch-php/commit/766b440)
- [TEST] add PHPStan to build (#628) [[946cd65]](http://github.com/elasticsearch/elasticsearch-php/commit/946cd65)
- [TEST] Fix some PHPCS violations in tests [[18a38dd]](http://github.com/elasticsearch/elasticsearch-php/commit/18a38dd)
- [src] add PHP_CodeSniffer (#647) [[24900ef]](http://github.com/elasticsearch/elasticsearch-php/commit/24900ef)
- [TEST] add PHP_CodeSniffer to build (#638) [[088a509]](http://github.com/elasticsearch/elasticsearch-php/commit/088a509)
- [TEST] Use tests from corresponding ES version (#649) [[75c6680]](http://github.com/elasticsearch/elasticsearch-php/commit/75c6680)
- [TEST] Add support for `bad_request` in yaml runner [[ad86f91]](http://github.com/elasticsearch/elasticsearch-php/commit/ad86f91)
- [TEST] `max_compilations_per_minute` is now `max_compilations_rate` [[ebdba06]](http://github.com/elasticsearch/elasticsearch-php/commit/ebdba06)
- [TEST] print elasticsearch.log if cluster fails to start [[fe796aa]](http://github.com/elasticsearch/elasticsearch-php/commit/fe796aa)
- [TEST] move integration test to dedicated test file [[71ccfc1]](http://github.com/elasticsearch/elasticsearch-php/commit/71ccfc1)
- [TEST] Client does not support accepting Yaml format responses [[fc9a9f9]](http://github.com/elasticsearch/elasticsearch-php/commit/fc9a9f9)
## Release 6.0.0-beta1
Woo!
- Use upper-case "Host" header [[045aac4]](http://github.com/elasticsearch/elasticsearch-php/commit/045aac4)
- Add 'allow_no_indices' param to Indices\Delete whitelist [[3a3a5ab]](http://github.com/elasticsearch/elasticsearch-php/commit/3a3a5ab)
- Add 'verbose' param to Snapshot\Get whitelist [[b70b933]](http://github.com/elasticsearch/elasticsearch-php/commit/b70b933)
- Add 'pre_filter_shard_size' param to Search whitelist [[f708d9d]](http://github.com/elasticsearch/elasticsearch-php/commit/f708d9d)
- Add 'ignore_unavailable' param to Indices\Delete whitelist [[8133021]](http://github.com/elasticsearch/elasticsearch-php/commit/8133021)
- Add 'include_defaults' param to Cluster\Settings\Get whitelist [[8e5ab38]](http://github.com/elasticsearch/elasticsearch-php/commit/8e5ab38)
### Docs
- [DOCS] Remove Sami from composer.json and update docs (#619) [[fcd5ff1]](http://github.com/elasticsearch/elasticsearch-php/commit/fcd5ff1)
- [Docs] recommend composer/ca-bundle instead of Kdyby/CurlCaBundle (#613) [[7f43b2e]](http://github.com/elasticsearch/elasticsearch-php/commit/7f43b2e)
### Testing
- [TEST] Fix content-type assertions in test to match case [[5b37117]](http://github.com/elasticsearch/elasticsearch-php/commit/5b37117)
- Capitalize 'Content-Type' for maximum compatibility [[b8ad96c]](http://github.com/elasticsearch/elasticsearch-php/commit/b8ad96c)
- [TEST] Use percentage watermarks to be compatible with default flood [[95d2f89]](http://github.com/elasticsearch/elasticsearch-php/commit/95d2f89)
- [TEST] remove watermark flood from static config [[9b71940]](http://github.com/elasticsearch/elasticsearch-php/commit/9b71940)
- Shrink API was not setting body correctly [[e0f0985]](http://github.com/elasticsearch/elasticsearch-php/commit/e0f0985)
- [TEST] Add some missing and required static configs [[38febbe]](http://github.com/elasticsearch/elasticsearch-php/commit/38febbe)
- [TEST] Allow skipping individual tests inside of test file [[51b9b9b]](http://github.com/elasticsearch/elasticsearch-php/commit/51b9b9b)
- Travis: add PHP 7.2 + ES 6.0 to build matrix (#622) [[061f100]](http://github.com/elasticsearch/elasticsearch-php/commit/061f100)
- [TEST] tests code cleanup (#618) [[dc5d18c]](http://github.com/elasticsearch/elasticsearch-php/commit/dc5d18c)
- [TEST] Fix RoundRobinSelector Tests (#617) [[23a0ba8]](http://github.com/elasticsearch/elasticsearch-php/commit/23a0ba8)
- [TEST] skip new percentile tests for now [[b5d9613]](http://github.com/elasticsearch/elasticsearch-php/commit/b5d9613)
- [TEST] drop HHVM from build [#611] (#616) [[21a2d24]](http://github.com/elasticsearch/elasticsearch-php/commit/21a2d24)
- [TEST] Skip cat.aliases/20_headers.yml [[c83ca74]](http://github.com/elasticsearch/elasticsearch-php/commit/c83ca74)
- [TEST] YamlRunnerTest should run both .yml and .yaml files [[98c2646]](http://github.com/elasticsearch/elasticsearch-php/commit/98c2646)
- [TEST] build against ES 6 on Travis [[b5886a8]](http://github.com/elasticsearch/elasticsearch-php/commit/b5886a8)
- [TEST] drop HHVM from build [#611] [[0a7b402]](http://github.com/elasticsearch/elasticsearch-php/commit/0a7b402)
- [TEST] test tweaks to appease stricter types [[51f189e]](http://github.com/elasticsearch/elasticsearch-php/commit/51f189e)
- Fix ClientBuilder - pass correct argument for Elasticsearch\Endpoints\MsearchTemplate::__construct. (#605) [[5f83b52]](http://github.com/elasticsearch/elasticsearch-php/commit/5f83b52)
- [TEST] improve code quality of tests (#610) [[9ea2156]](http://github.com/elasticsearch/elasticsearch-php/commit/9ea2156)
- [TEST] Support headers in yaml runner, do some bad-comment cleaning [[57b5489]](http://github.com/elasticsearch/elasticsearch-php/commit/57b5489)
- [TEST] fix handling of format for Cat tests [[a24b7d1]](http://github.com/elasticsearch/elasticsearch-php/commit/a24b7d1)
- [TEST] test files are now .yml instead of .yaml [[ceac5bd]](http://github.com/elasticsearch/elasticsearch-php/commit/ceac5bd)
LICENSE 0000644 00000002071 14221060012 0005535 0 ustar 00 Copyright 2022 Elasticsearch B.V (https://www.elastic.co)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. README.md 0000644 00000030225 14221060012 0006011 0 ustar 00
Elasticsearch PHP client
========================
[![Build status](https://github.com/elastic/elasticsearch-php/workflows/PHP%20test/badge.svg)](https://github.com/elastic/elasticsearch-php/actions) [![Latest Stable Version](https://poser.pugx.org/elasticsearch/elasticsearch/v/stable)](https://packagist.org/packages/elasticsearch/elasticsearch) [![Total Downloads](https://poser.pugx.org/elasticsearch/elasticsearch/downloads)](https://packagist.org/packages/elasticsearch/elasticsearch)
This is the official PHP client for [Elasticsearch](https://www.elastic.co/elasticsearch/).
## Contents
- [Getting started](#getting-started-)
- [Configuration](#configuration)
- [Use Elastic Cloud](#use-elastic-cloud)
- [Usage](#usage)
- [Index a document](#index-a-document)
- [Search a document](#search-a-document)
- [Delete a document](#delete-a-document)
- [Versioning](#versioning)
- [Backward Incompatible Changes](#backward-incompatible-changes-)
- [FAQ](#faq-)
- [Contribute](#contribute-)
- [License](#license-)
***
## Getting started 🐣
Using this client assumes that you have an [Elasticsearch](https://www.elastic.co/elasticsearch/)
server installed and running.
You can install the client in your PHP project using [composer](https://getcomposer.org/):
```bash
composer require elasticsearch/elasticsearch
```
After the installation you can connect to Elasticsearch using the `ClientBuilder`
class. For instance, if your Elasticsearch is running on `localhost:9200`
you can use the following code:
```php
use Elastic\Elasticsearch\ClientBuilder;
$client = ClientBuilder::create()
->setHosts(['localhost:9200'])
->build();
// Info API
$response = $client->info();
echo $response['version']['number']; // 8.0.0
```
The `$response` is an object of `Elastic\Elasticsearch\Response\Elasticsearch`
class that implements `ElasticsearchInterface`, PSR-7 [ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface)
and [ArrayAccess](https://www.php.net/manual/en/class.arrayaccess.php).
This means the `$response` is a [PSR-7](https://www.php-fig.org/psr/psr-7/)
object:
```php
echo $response->getStatusCode(); // 200
echo (string) $response->getBody(); // Response body in JSON
```
and also an "array", meaning you can access the response body as an
associative array, as follows:
```php
echo $response['version']['number']; // 8.0.0
var_dump($response->asArray()); // response body content as array
```
Moreover, you can access the response body as object, string or bool:
```php
echo $response->version->number; // 8.0.0
var_dump($response->asObject()); // response body content as object
var_dump($response->asString()); // response body as string (JSON)
var_dump($response->asBool()); // true if HTTP response code between 200 and 300
```
## Configuration
Elasticsearch 8.0 offers [security by default](https://www.elastic.co/blog/introducing-simplified-elastic-stack-security),
that means it uses [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security)
for protect the communication between client and server.
In order to configure `elasticsearch-php` for connecting to Elasticsearch 8.0 we
need to have the certificate authority file (CA).
You can install Elasticsearch in different ways, for instance using [Docker](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)
you need to execute the followind command:
```bash
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.0.1
```
Once you have the docker image installed you can execute Elasticsearch,
for instance using a single-node cluster configuration, as follows:
```bash
docker network create elastic
docker run --name es01 --net elastic -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.0.1
```
This command creates an `elastic` Docker network and start Elasticsearch
using the port `9200` (default).
When you run the docker imnage a password is generated for the `elastic` user
and it's printed to the terminal (you might need to scroll back a bit in the terminal
to view it). You have to copy it since we will need to connect to Elasticsearch.
Now that Elasticsearch is running we can get the `http_ca.crt` file certificate.
We need to copy it from the docker instance, using the following command:
```bash
docker cp es01:/usr/share/elasticsearch/config/certs/http_ca.crt .
```
Once we have the `http_ca.crt` certificate and the `password`, copied during the
start of Elasticsearch, we can use it to connect with `elasticsearch-php`
as follows:
```php
$client = ClientBuilder::create()
->setHosts(['https://localhost:9200'])
->setBasicAuthentication('elastic', 'password copied during Elasticsearch start')
->setCABundle('path/to/http_ca.crt')
->build();
```
For more information about the Docker configuration of Elasticsearch you can
read the official documentation [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).
### Use Elastic Cloud
You can use [Elastic Cloud](https://www.elastic.co/cloud/) as server with `elasticsearch-php`.
Elastic Cloud is the PaaS solution offered by [Elastic](https://www.elastic.co).
For connecting to Elastic Cloud you just need the `Cloud ID` and the `API key`.
You can get the `Cloud ID` from the `My deployment` page of your dashboard (see the red
rectangle reported in the screenshot).
![Cloud ID](docs/images/cloud_id.png)
You can generate an `API key` in the `Management` page under the section `Security`.
![Security](docs/images/create_api_key.png)
When you click on `Create API key` button you can choose a name and set the other
options (eg. restrict privileges, expire after time, etc).
![Choose an API name](docs/images/api_key_name.png)
After this step you will get the `API key`in the API keys page.
![API key](docs/images/cloud_api_key.png)
**IMPORTANT**: you need to copy and store the `API key`in a secure place, since you will not
be able to view it again in Elastic Cloud.
Once you have collected the `Cloud ID` and the `API key` you can use `elasticsearch-php`
to connect to your Elastic Cloud instance, as follows:
```php
$client = ClientBuilder::create()
->setElasticCloudId('insert here the Cloud ID')
->setApiKey('insert here the API key')
->build();
```
## Usage
The `elasticsearch-php` client offers 400+ endpoints for interacting with Elasticsearch.
A list of all these endpoints is available in the [official documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html)
of Elasticsearch APIs.
Here we reported the basic operation that you can perform with the client: index, search and delete.
### Index a document
You can store (index) a JSON document in Elasticsearch using the following code:
```php
use Elastic\Elasticsearch\Exception\ClientResponseException;
use Elastic\Elasticsearch\Exception\ServerResponseException;
$params = [
'index' => 'my_index',
'body' => [ 'testField' => 'abc']
];
try {
$response = $client->index($params);
} catch (ClientResponseException $e) {
// manage the 4xx error
} catch (ServerResponseException $e) {
// manage the 5xx error
} catch (Exception $e) {
// eg. network error like NoNodeAvailableException
}
print_r($response->asArray()); // response body content as array
```
Elasticsearch stores the `{"testField":"abc"}` JSON document in the `my_index` index.
The `ID` of the document is created automatically by Elasticsearch and stored in
`$response['_id']` field value. If you want to specify an `ID` for the document you need
to store it in `$params['id']`.
You can manage errors using `ClientResponseException` and `ServerResponseException`.
The PSR-7 response is available using `$e->getResponse()` and the HTTP status code is
available using `$e->getCode()`.
### Search a document
Elasticsearch provides many different way to search documents. The simplest search
that you can perform is a [match query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html),
as follows:
```php
$params = [
'index' => 'my_index',
'body' => [
'query' => [
'match' => [
'testField' => 'abc'
]
]
]
];
$response = $client->search($params);
printf("Total docs: %d\n", $response['hits']['total']['value']);
printf("Max score : %.4f\n", $response['hits']['max_score']);
printf("Took : %d ms\n", $response['took']);
print_r($response['hits']['hits']); // documents
```
Using Elasticsearch you can perform different query search, for more information we suggest to
read the official documention reported [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html).
### Delete a document
You can delete a document specifing the `index` name and the `ID` of the document,
as follows:
```php
use Elastic\Elasticsearch\Exception\ClientResponseException;
try {
$response = $client->delete([
'index' => 'my_index',
'id' => 'my_id'
]);
} catch (ClientResponseException $e) {
if ($e->getCode() === 404) {
// the document does not exist
}
}
if ($response['acknowledge'] === 1) {
// the document has been delete
}
```
For more information about the Elasticsearch REST API you can read the official documentation
[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html).
### Versioning
This client is versioned and released alongside Elasticsearch server.
To guarantee compatibility, use the most recent version of this library within the major version of the corresponding Enterprise Search implementation.
For example, for Elasticsearch `7.16`, use `7.16` of this library or above, but not `8.0`.
## Backward Incompatible Changes :boom:
The 8.0.0 version of `elasticsearch-php` contains a new implementation compared with 7.x.
It supports [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages and [PSR-18](https://www.php-fig.org/psr/psr-18/)
for HTTP client communications.
We tried to reduce the BC breaks as much as possible with `7.x` but there are some (big) differences:
- we changed the namespace, now everything is under `Elastic\Elasticsearch`
- we used the [elastic-transport-php](https://github.com/elastic/elastic-transport-php) library for HTTP communications;
- we changed the `Exception` model, using the namespace `Elastic\Elasticsearch\Exception`. All the exceptions extends the
`ElasticsearchException` interface, as in 7.x
- we changed the response type of each endpoints using an [Elasticsearch](src/Response/Elasticsearch.php) response class.
This class wraps a a [PSR-7](https://www.php-fig.org/psr/psr-7/) response allowing the access of the body response
as array or object. This means you can access the API response as in 7.x, no BC break here! :angel:
- we changed the `ConnectionPool` in `NodePool`. The `connection` naming was ambigous since the objects are nodes (hosts)
You can have a look at the [BREAKING_CHANGES](BREAKING_CHANGES.md) file for more information.
## FAQ 🔮
### Where do I report issues with the client?
If something is not working as expected, please open an [issue](https://github.com/elastic/elasticsearh-php/issues/new).
### Where else can I go to get help?
You can checkout the [Elastic community discuss forums](https://discuss.elastic.co/).
## Contribute 🚀
We welcome contributors to the project. Before you begin, a couple notes...
+ If you want to contribute to this project you need to subscribe to a [Contributor Agreement](https://www.elastic.co/contributor-agreement).
+ Before opening a pull request, please create an issue to [discuss the scope of your proposal](https://github.com/elastic/elasticsearch-php/issues).
+ If you want to send a PR for version `8.0` please use the `8.0` branch.
+ Never send PR to `master` unless you want to contribute to the development version of the client (`master` represents the next major version).
+ Each PR should include a **unit test** using [PHPUnit](https://phpunit.de/). If you are not familiar with PHPUnit you can have a look at the [reference](https://phpunit.readthedocs.io/en/9.5/).
Thanks in advance for your contribution! :heart:
## License 📗
[MIT](LICENSE) © [Elastic](https://www.elastic.co/)
composer.json 0000644 00000002213 14221060012 0007250 0 ustar 00 {
"name": "elasticsearch/elasticsearch",
"description": "PHP Client for Elasticsearch",
"keywords": [
"search",
"client",
"elasticsearch",
"elastic"
],
"type": "library",
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"elastic/transport": "^8.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0",
"psr/log": "^1 || ^2 || ^3",
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
"ext-yaml": "*",
"ext-zip": "*",
"mockery/mockery": "^1.5",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"symfony/finder": "~4.0",
"nyholm/psr7": "^1.5",
"php-http/mock-client": "^1.5"
},
"autoload": {
"psr-4": {
"Elastic\\Elasticsearch\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Elastic\\Elasticsearch\\Tests\\": "tests/",
"Elastic\\Elasticsearch\\Util\\": "util/"
}
},
"scripts": {
"test" : [
"vendor/bin/phpunit --testdox"
],
"integration-test" : [
"vendor/bin/phpunit --testdox -c phpunit-integration-tests.xml"
],
"phpstan": [
"phpstan analyse src --level 2 --no-progress"
]
}
}
docs/breaking-changes.asciidoc 0000644 00000003217 14221060012 0012353 0 ustar 00 [[breaking_changes]]
=== Breaking changes from 6.x
[discrete]
==== E_USER_DEPRECATED notice when using deprecated parameters
Starting from elasticsearch-php 7.4.0, we generate a PHP
https://www.php.net/manual/en/errorfunc.constants.php[E_USER_DEPRECATED] notice
every time you use a deprecated parameters for {es}. We decided to add this
notice to facilitate the code refactoring with the new API specification of {es}
(for example the usage of typeless APIs, see below).
From 7.4.1, we mitigated the usage of E_USER_DEPRICATED warning by using the `@`
https://www.php.net/manual/en/language.operators.errorcontrol.php[operator]. The
operator suppresses the error message, however, it is still possible to catch it
by using a custom error handler:
[source,php]
----
set_error_handler(function ($errno, $errstr) {
var_dump($errstr);
}, E_USER_DEPRECATED);
@trigger_error('Deprecation message here', E_USER_DEPRECATED);
----
[discrete]
==== Moving from types to typeless APIs in {es} 7.0
{es} 7.0 deprecated APIs that accept types, introduced new typeless APIs, and
removed support for the _default_ mapping. Read
https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0[this]
blog post for more information.
[discrete]
==== Type hint and return type
Added type hints and return type declarations in all the code base where
possible. See PR https://github.com/elastic/elasticsearch-php/pull/897[#897].
[discrete]
==== PHP 7.1+ Requirement
We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since
1st Jan 2019. Refer
https://www.php.net/supported-versions.php[PHP supported version] for more
information.
docs/build/DOCTUM_VERSION 0000644 00000000005 14221060012 0010675 0 ustar 00 5.1.0 docs/build/Elasticsearch/Client.asciidoc 0000644 00000143231 14221060012 0014253 0 ustar 00 [discrete]
[[Elasticsearch_Client]]
=== Elasticsearch\Client
Class Client
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Clientbulk_bulk]]
.`bulk()`
****
[source,php]
----
/*
$params['index'] = (string) Default index for items which don't provide one
$params['type'] = DEPRECATED (string) Default document type for items which don't provide one
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['_source'] = (list) True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
$params['_source_excludes'] = (list) Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
$params['_source_includes'] = (list) Default list of fields to extract and return from the _source field, can be overridden on each sub-request
$params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
$params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->bulk($params);
----
****
[[Elasticsearch_ClientclearScroll_clearScroll]]
.`clearScroll()`
****
[source,php]
----
/*
$params['scroll_id'] = DEPRECATED (list) A comma-separated list of scroll IDs to clear
$params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->clearScroll($params);
----
****
[[Elasticsearch_Clientcount_count]]
.`count()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of indices to restrict the results
$params['type'] = DEPRECATED (list) A comma-separated list of types to restrict the results
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['min_score'] = (number) Include only documents with a specific `_score` value in the result
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['routing'] = (list) A comma-separated list of specific routing values
$params['q'] = (string) Query in the Lucene query string syntax
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['terminate_after'] = (number) The maximum count for each shard, upon reaching which the query execution will terminate early
$params['body'] = (array) A query to restrict the results specified with the Query DSL (optional)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->count($params);
----
****
[[Elasticsearch_Clientcreate_create]]
.`create()`
****
[source,php]
----
/*
$params['id'] = (string) Document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
$params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
$params['body'] = (array) The document (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->create($params);
----
****
[[Elasticsearch_Clientdelete_delete]]
.`delete()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['if_seq_no'] = (number) only perform the delete operation if the last operation that has changed the document has the specified sequence number
$params['if_primary_term'] = (number) only perform the delete operation if the last operation that has changed the document has the specified primary term
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->delete($params);
----
****
[[Elasticsearch_ClientdeleteByQuery_deleteByQuery]]
.`deleteByQuery()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required)
$params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['from'] = (number) Starting offset (default: 0)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['conflicts'] = (enum) What to do when the delete by query hits version conflicts? (Options = abort,proceed) (Default = abort)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (list) A comma-separated list of specific routing values
$params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
$params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->deleteByQuery($params);
----
****
[[Elasticsearch_ClientdeleteByQueryRethrottle_deleteByQueryRethrottle]]
.`deleteByQueryRethrottle()`
****
[source,php]
----
/*
$params['task_id'] = (string) The task id to rethrottle
$params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->deleteByQueryRethrottle($params);
----
****
[[Elasticsearch_ClientdeleteScript_deleteScript]]
.`deleteScript()`
****
[source,php]
----
/*
$params['id'] = (string) Script ID
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->deleteScript($params);
----
****
[[Elasticsearch_Clientexists_exists]]
.`exists()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document (use `_all` to fetch the first document matching the ID across all types)
$params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
$params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->exists($params);
----
****
[[Elasticsearch_ClientexistsSource_existsSource]]
.`existsSource()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document; deprecated and optional starting with 7.0
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
$params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->existsSource($params);
----
****
[[Elasticsearch_Clientexplain_explain]]
.`explain()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document
$params['analyze_wildcard'] = (boolean) Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
$params['analyzer'] = (string) The analyzer for the query string query
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The default field for query string query (default: _all)
$params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['body'] = (array) The query definition using the Query DSL
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->explain($params);
----
****
[[Elasticsearch_ClientfieldCaps_fieldCaps]]
.`fieldCaps()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['fields'] = (list) A comma-separated list of field names
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['include_unmapped'] = (boolean) Indicates whether unmapped fields should be included in the response. (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->fieldCaps($params);
----
****
[[Elasticsearch_Clientget_get]]
.`get()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document (use `_all` to fetch the first document matching the ID across all types)
$params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
$params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->get($params);
----
****
[[Elasticsearch_ClientgetScript_getScript]]
.`getScript()`
****
[source,php]
----
/*
$params['id'] = (string) Script ID
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->getScript($params);
----
****
[[Elasticsearch_ClientgetSource_getSource]]
.`getSource()`
****
[source,php]
----
/*
$params['id'] = (string) The document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document; deprecated and optional starting with 7.0
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
$params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->getSource($params);
----
****
[[Elasticsearch_Clientindex_index]]
.`index()`
****
[source,php]
----
/*
$params['id'] = (string) Document ID
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['op_type'] = (enum) Explicit operation type (Options = index,create) (Default = index)
$params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['version'] = (number) Explicit version number for concurrency control
$params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force)
$params['if_seq_no'] = (number) only perform the index operation if the last operation that has changed the document has the specified sequence number
$params['if_primary_term'] = (number) only perform the index operation if the last operation that has changed the document has the specified primary term
$params['pipeline'] = (string) The pipeline id to preprocess incoming documents with
$params['body'] = (array) The document (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->index($params);
----
****
[[Elasticsearch_Clientinfo_info]]
.`info()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->info($params);
----
****
[[Elasticsearch_Clientmget_mget]]
.`mget()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index
$params['type'] = DEPRECATED (string) The type of the document
$params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
$params['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
$params['routing'] = (string) Specific routing value
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->mget($params);
----
****
[[Elasticsearch_Clientmsearch_msearch]]
.`msearch()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to use as default
$params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch)
$params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
$params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. (Default = 128)
$params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = 5)
$params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
$params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
$params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->msearch($params);
----
****
[[Elasticsearch_ClientmsearchTemplate_msearchTemplate]]
.`msearchTemplate()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to use as default
$params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch)
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
$params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute
$params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
$params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->msearchTemplate($params);
----
****
[[Elasticsearch_Clientmtermvectors_mtermvectors]]
.`mtermvectors()`
****
[source,php]
----
/*
$params['index'] = (string) The index in which the document resides.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->mtermvectors($params);
----
****
[[Elasticsearch_Clientping_ping]]
.`ping()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ping($params);
----
****
[[Elasticsearch_ClientputScript_putScript]]
.`putScript()`
****
[source,php]
----
/*
$params['id'] = (string) Script ID (Required)
$params['context'] = (string) Script context
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['body'] = (array) The document (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->putScript($params);
----
****
[[Elasticsearch_ClientrankEval_rankEval]]
.`rankEval()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['body'] = (array) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->rankEval($params);
----
****
[[Elasticsearch_Clientreindex_reindex]]
.`reindex()`
****
[source,php]
----
/*
$params['refresh'] = (boolean) Should the effected indexes be refreshed?
$params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m)
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete. (Default = true)
$params['requests_per_second'] = (number) The throttle to set on this request in sub-requests per second. -1 means no throttle. (Default = 0)
$params['scroll'] = (time) Control how long to keep the search context alive (Default = 5m)
$params['slices'] = (number) The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. (Default = 1)
$params['max_docs'] = (number) Maximum number of documents to process (default: all documents)
$params['body'] = (array) The search definition using the Query DSL and the prototype for the index request. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->reindex($params);
----
****
[[Elasticsearch_ClientreindexRethrottle_reindexRethrottle]]
.`reindexRethrottle()`
****
[source,php]
----
/*
$params['task_id'] = (string) The task id to rethrottle
$params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->reindexRethrottle($params);
----
****
[[Elasticsearch_ClientrenderSearchTemplate_renderSearchTemplate]]
.`renderSearchTemplate()`
****
[source,php]
----
/*
$params['id'] = (string) The id of the stored search template
$params['body'] = (array) The search definition template and its params
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->renderSearchTemplate($params);
----
****
[[Elasticsearch_ClientscriptsPainlessExecute_scriptsPainlessExecute]]
.`scriptsPainlessExecute()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['body'] = (array) The script to execute
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->scriptsPainlessExecute($params);
----
****
[[Elasticsearch_Clientscroll_scroll]]
.`scroll()`
****
[source,php]
----
/*
$params['scroll_id'] = DEPRECATED (string) The scroll ID
$params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
$params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
$params['body'] = (array) The scroll ID if not passed by URL or query parameter.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->scroll($params);
----
****
[[Elasticsearch_Clientsearch_search]]
.`search()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
$params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
$params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
$params['from'] = (number) Starting offset (default: 0)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (list) A comma-separated list of specific routing values
$params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
$params['size'] = (number) Number of hits to return (default: 10)
$params['sort'] = (list) A comma-separated list of : pairs
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->search($params);
----
****
[[Elasticsearch_ClientsearchShards_searchShards]]
.`searchShards()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['routing'] = (string) Specific routing value
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->searchShards($params);
----
****
[[Elasticsearch_ClientsearchTemplate_searchTemplate]]
.`searchTemplate()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['routing'] = (list) A comma-separated list of specific routing values
$params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch)
$params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
$params['profile'] = (boolean) Specify whether to profile the query execution
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
$params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
$params['body'] = (array) The search definition template and its params (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->searchTemplate($params);
----
****
[[Elasticsearch_Clienttermvectors_termvectors]]
.`termvectors()`
****
[source,php]
----
/*
$params['index'] = (string) The index in which the document resides. (Required)
$params['id'] = (string) The id of the document, when not specified a doc param should be supplied.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->termvectors($params);
----
****
[[Elasticsearch_Clientupdate_update]]
.`update()`
****
[source,php]
----
/*
$params['id'] = (string) Document ID (Required)
$params['index'] = (string) The name of the index (Required)
$params['type'] = DEPRECATED (string) The type of the document
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['lang'] = (string) The script language (default: painless)
$params['refresh'] = (enum) If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$params['retry_on_conflict'] = (number) Specify how many times should the operation be retried when a conflict occurs (default: 0)
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['if_seq_no'] = (number) only perform the update operation if the last operation that has changed the document has the specified sequence number
$params['if_primary_term'] = (number) only perform the update operation if the last operation that has changed the document has the specified primary term
$params['body'] = (array) The request definition requires either `script` or partial `doc` (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->update($params);
----
****
[[Elasticsearch_ClientupdateByQuery_updateByQuery]]
.`updateByQuery()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required)
$params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['from'] = (number) Starting offset (default: 0)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['conflicts'] = (enum) What to do when the update by query hits version conflicts? (Options = abort,proceed) (Default = abort)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['pipeline'] = (string) Ingest pipeline to set on index requests made by this action. (default: none)
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (list) A comma-separated list of specific routing values
$params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
$params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->updateByQuery($params);
----
****
[[Elasticsearch_ClientupdateByQueryRethrottle_updateByQueryRethrottle]]
.`updateByQueryRethrottle()`
****
[source,php]
----
/*
$params['task_id'] = (string) The task id to rethrottle
$params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->updateByQueryRethrottle($params);
----
****
[[Elasticsearch_Clientcat_cat]]
.`cat()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat();
----
****
[[Elasticsearch_Clientcluster_cluster]]
.`cluster()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster();
----
****
[[Elasticsearch_Clientindices_indices]]
.`indices()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices();
----
****
[[Elasticsearch_Clientingest_ingest]]
.`ingest()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest();
----
****
[[Elasticsearch_Clientnodes_nodes]]
.`nodes()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->nodes();
----
****
[[Elasticsearch_Clientsnapshot_snapshot]]
.`snapshot()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->snapshot();
----
****
[[Elasticsearch_Clienttasks_tasks]]
.`tasks()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->tasks();
----
****
[[Elasticsearch_Client-call-_call]]
.`__call()`
****
[source,php]
----
/*
Catchall for registered namespaces
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->__call($name,$arguments);
----
****
[[Elasticsearch_ClientextractArgument_extractArgument]]
.`extractArgument()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->extractArgument($params,$arg);
----
****
docs/build/Elasticsearch/ClientBuilder.asciidoc 0000644 00000015351 14221060012 0015563 0 ustar 00 [discrete]
[[Elasticsearch_ClientBuilder]]
=== Elasticsearch\ClientBuilder
Class ClientBuilder
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_ClientBuildercreate_create]]
.`create()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildergetTransport_getTransport]]
.`getTransport()`
****
[source,php]
----
/*
Can supply first parm to Client::__construct() when invoking manually or with dependency injection
*/
----
****
[[Elasticsearch_ClientBuildergetEndpoint_getEndpoint]]
.`getEndpoint()`
****
[source,php]
----
/*
Can supply second parm to Client::__construct() when invoking manually or with dependency injection
*/
----
****
[[Elasticsearch_ClientBuildergetRegisteredNamespacesBuilders_getRegisteredNamespacesBuilders]]
.`getRegisteredNamespacesBuilders()`
****
[source,php]
----
/*
Can supply third parm to Client::__construct() when invoking manually or with dependency injection
*/
----
****
[[Elasticsearch_ClientBuilderfromConfig_fromConfig]]
.`fromConfig()`
****
[source,php]
----
/*
Build a new client from the provided config. Hash keys
should correspond to the method name e.g. ['connectionPool']
corresponds to setConnectionPool().
*/
----
****
[[Elasticsearch_ClientBuilderdefaultHandler_defaultHandler]]
.`defaultHandler()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildermultiHandler_multiHandler]]
.`multiHandler()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersingleHandler_singleHandler]]
.`singleHandler()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetConnectionFactory_setConnectionFactory]]
.`setConnectionFactory()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetConnectionPool_setConnectionPool]]
.`setConnectionPool()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetEndpoint_setEndpoint]]
.`setEndpoint()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuilderregisterNamespace_registerNamespace]]
.`registerNamespace()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetTransport_setTransport]]
.`setTransport()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetHandler_setHandler]]
.`setHandler()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetLogger_setLogger]]
.`setLogger()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetTracer_setTracer]]
.`setTracer()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSerializer_setSerializer]]
.`setSerializer()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetHosts_setHosts]]
.`setHosts()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetApiKey_setApiKey]]
.`setApiKey()`
****
[source,php]
----
/*
Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key
*/
----
****
[[Elasticsearch_ClientBuildersetBasicAuthentication_setBasicAuthentication]]
.`setBasicAuthentication()`
****
[source,php]
----
/*
Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key
*/
----
****
[[Elasticsearch_ClientBuildersetElasticCloudId_setElasticCloudId]]
.`setElasticCloudId()`
****
[source,php]
----
/*
Set Elastic Cloud ID to connect to Elastic Cloud
*/
----
****
[[Elasticsearch_ClientBuildersetConnectionParams_setConnectionParams]]
.`setConnectionParams()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetRetries_setRetries]]
.`setRetries()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSelector_setSelector]]
.`setSelector()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSniffOnStart_setSniffOnStart]]
.`setSniffOnStart()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSSLCert_setSSLCert]]
.`setSSLCert()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSSLKey_setSSLKey]]
.`setSSLKey()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuildersetSSLVerification_setSSLVerification]]
.`setSSLVerification()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuilderbuild_build]]
.`build()`
****
[source,php]
----
/*
*/
----
****
[[Elasticsearch_ClientBuilderinstantiate_instantiate]]
.`instantiate()`
****
[source,php]
----
/*
*/
----
****
docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc 0000644 00000013247 14221060012 0021137 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_AsyncSearchNamespace]]
=== Elasticsearch\Namespaces\AsyncSearchNamespace
Class AsyncSearchNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
[[Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete]]
.`delete()`
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->delete($params);
----
****
[[Elasticsearch_Namespaces_AsyncSearchNamespaceget_get]]
.`get()`
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
$params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available
$params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->get($params);
----
****
[[Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit]]
.`submit()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response (Default = 1s)
$params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false)
$params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
$params['batched_reduce_size'] = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available. (Default = 5)
$params['request_cache'] = (boolean) Specify if request cache should be used for this request or not, defaults to true
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
$params['stored_fields'] = (list) A comma-separated list of stored fields to return as part of a hit
$params['docvalue_fields'] = (list) A comma-separated list of fields to return as the docvalue representation of a field for each hit
$params['from'] = (number) Starting offset (default: 0)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indices should be ignored when throttled
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
$params['q'] = (string) Query in the Lucene query string syntax
$params['routing'] = (list) A comma-separated list of specific routing values
$params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch)
$params['size'] = (number) Number of hits to return (default: 10)
$params['sort'] = (list) A comma-separated list of : pairs
$params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
$params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field
$params['_source_includes'] = (list) A list of fields to extract and return from the _source field
$params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->asyncsearch()->submit($params);
----
****
docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc 0000644 00000004706 14221060012 0021205 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_AutoscalingNamespace]]
=== Elasticsearch\Namespaces\AutoscalingNamespace
Class AutoscalingNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy]]
.`deleteAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->deleteAutoscalingPolicy($params);
----
****
[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision]]
.`getAutoscalingDecision()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->getAutoscalingDecision($params);
----
****
[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy]]
.`getAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->getAutoscalingPolicy($params);
----
****
[[Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy]]
.`putAutoscalingPolicy()`
*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release
****
[source,php]
----
/*
$params['name'] = (string) the name of the autoscaling policy
$params['body'] = (array) the specification of the autoscaling policy (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->autoscaling()->putAutoscalingPolicy($params);
----
****
docs/build/Elasticsearch/Namespaces/CatNamespace.asciidoc 0000644 00000052621 14221060012 0017442 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_CatNamespace]]
=== Elasticsearch\Namespaces\CatNamespace
Class CatNamespace
Generated running $ php util/GenerateEndpoints.php 7.4.2
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_CatNamespacealiases_aliases]]
.`aliases()`
****
[source,php]
----
/*
$params['name'] = (list) A comma-separated list of alias names to return
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->aliases($params);
----
****
[[Elasticsearch_Namespaces_CatNamespaceallocation_allocation]]
.`allocation()`
****
[source,php]
----
/*
$params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->allocation($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacecount_count]]
.`count()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->count($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacefielddata_fielddata]]
.`fielddata()`
****
[source,php]
----
/*
$params['fields'] = (list) A comma-separated list of fields to return the fielddata size
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->fielddata($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacehealth_health]]
.`health()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['ts'] = (boolean) Set to false to disable timestamping (Default = true)
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->health($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacehelp_help]]
.`help()`
****
[source,php]
----
/*
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->help($params);
----
****
[[Elasticsearch_Namespaces_CatNamespaceindices_indices]]
.`indices()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,m,g)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['health'] = (enum) A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (Options = green,yellow,red)
$params['help'] = (boolean) Return help information (Default = false)
$params['pri'] = (boolean) Set to true to return stats only for primary shards (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
$params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->indices($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacemaster_master]]
.`master()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->master($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacenodeattrs_nodeattrs]]
.`nodeattrs()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->nodeattrs($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacenodes_nodes]]
.`nodes()`
****
[source,php]
----
/*
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->nodes($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacependingTasks_pendingTasks]]
.`pendingTasks()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->pendingTasks($params);
----
****
[[Elasticsearch_Namespaces_CatNamespaceplugins_plugins]]
.`plugins()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->plugins($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacerecovery_recovery]]
.`recovery()`
****
[source,php]
----
/*
$params['index'] = (list) Comma-separated list or wildcard expression of index names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries (Default = false)
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries (Default = false)
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->recovery($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacerepositories_repositories]]
.`repositories()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->repositories($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacesegments_segments]]
.`segments()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->segments($params);
----
****
[[Elasticsearch_Namespaces_CatNamespaceshards_shards]]
.`shards()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to limit the returned information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->shards($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacesnapshots_snapshots]]
.`snapshots()`
****
[source,php]
----
/*
$params['repository'] = (list) Name of repository from which to fetch the snapshot information
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['time'] = (enum) The unit in which to display time values (Options = d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->snapshots($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacetasks_tasks]]
.`tasks()`
****
[source,php]
----
/*
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
$params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->tasks($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacetemplates_templates]]
.`templates()`
****
[source,php]
----
/*
$params['name'] = (string) A pattern that returned template names must match
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->templates($params);
----
****
[[Elasticsearch_Namespaces_CatNamespacethreadPool_threadPool]]
.`threadPool()`
****
[source,php]
----
/*
$params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output
$params['format'] = (string) a short version of the Accept header, e.g. json, yaml
$params['size'] = (enum) The multiplier in which to display values (Options = ,k,m,g,t,p)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['h'] = (list) Comma-separated list of column names to display
$params['help'] = (boolean) Return help information (Default = false)
$params['s'] = (list) Comma-separated list of column names or column aliases to sort by
$params['v'] = (boolean) Verbose mode. Display column headers (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cat()->threadPool($params);
----
****
docs/build/Elasticsearch/Namespaces/CcrNamespace.asciidoc 0000644 00000014717 14221060012 0017446 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_CcrNamespace]]
=== Elasticsearch\Namespaces\CcrNamespace
Class CcrNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_CcrNamespacedeleteAutoFollowPattern_deleteAutoFollowPattern]]
.`deleteAutoFollowPattern()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the auto follow pattern.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->deleteAutoFollowPattern($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacefollow_follow]]
.`follow()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the follower index
$params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) (Default = 0)
$params['body'] = (array) The name of the leader index and other optional ccr related parameters (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->follow($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacefollowInfo_followInfo]]
.`followInfo()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->followInfo($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacefollowStats_followStats]]
.`followStats()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->followStats($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespaceforgetFollower_forgetFollower]]
.`forgetFollower()`
****
[source,php]
----
/*
$params['index'] = (string) the name of the leader index for which specified follower retention leases should be removed
$params['body'] = (array) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->forgetFollower($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacegetAutoFollowPattern_getAutoFollowPattern]]
.`getAutoFollowPattern()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the auto follow pattern.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->getAutoFollowPattern($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacepauseAutoFollowPattern_pauseAutoFollowPattern]]
.`pauseAutoFollowPattern()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the auto follow pattern that should pause discovering new indices to follow.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->pauseAutoFollowPattern($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacepauseFollow_pauseFollow]]
.`pauseFollow()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the follower index that should pause following its leader index.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->pauseFollow($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespaceputAutoFollowPattern_putAutoFollowPattern]]
.`putAutoFollowPattern()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the auto follow pattern.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->putAutoFollowPattern($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespaceresumeAutoFollowPattern_resumeAutoFollowPattern]]
.`resumeAutoFollowPattern()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the auto follow pattern to resume discovering new indices to follow.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->resumeAutoFollowPattern($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespaceresumeFollow_resumeFollow]]
.`resumeFollow()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the follow index to resume following.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->resumeFollow($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespacestats_stats]]
.`stats()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->stats($params);
----
****
[[Elasticsearch_Namespaces_CcrNamespaceunfollow_unfollow]]
.`unfollow()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the follower index that should be turned into a regular index.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ccr()->unfollow($params);
----
****
docs/build/Elasticsearch/Namespaces/ClusterNamespace.asciidoc 0000644 00000020570 14221060012 0020352 0 ustar 00 [discrete]
[[Elasticsearch_Namespaces_ClusterNamespace]]
=== Elasticsearch\Namespaces\ClusterNamespace
Class ClusterNamespace
Generated running $ php util/GenerateEndpoints.php 7.4.2
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_ClusterNamespaceallocationExplain_allocationExplain]]
.`allocationExplain()`
****
[source,php]
----
/*
$params['include_yes_decisions'] = (boolean) Return 'YES' decisions in explanation (default: false)
$params['include_disk_info'] = (boolean) Return information about disk usage and shard sizes (default: false)
$params['body'] = (array) The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->allocationExplain($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacegetSettings_getSettings]]
.`getSettings()`
****
[source,php]
----
/*
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
$params['include_defaults'] = (boolean) Whether to return all default clusters setting. (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->getSettings($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacehealth_health]]
.`health()`
****
[source,php]
----
/*
$params['index'] = (list) Limit the information returned to a specific index
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = all)
$params['level'] = (enum) Specify the level of detail for returned information (Options = cluster,indices,shards) (Default = cluster)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
$params['wait_for_active_shards'] = (string) Wait until the specified number of shards is active
$params['wait_for_nodes'] = (string) Wait until the specified number of nodes is available
$params['wait_for_events'] = (enum) Wait until all currently queued events with the given priority are processed (Options = immediate,urgent,high,normal,low,languid)
$params['wait_for_no_relocating_shards'] = (boolean) Whether to wait until there are no relocating shards in the cluster
$params['wait_for_no_initializing_shards'] = (boolean) Whether to wait until there are no initializing shards in the cluster
$params['wait_for_status'] = (enum) Wait until cluster is in a specific state (Options = green,yellow,red)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->health($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacependingTasks_pendingTasks]]
.`pendingTasks()`
****
[source,php]
----
/*
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->pendingTasks($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespaceputSettings_putSettings]]
.`putSettings()`
****
[source,php]
----
/*
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
$params['body'] = (array) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->putSettings($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespaceremoteInfo_remoteInfo]]
.`remoteInfo()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->remoteInfo($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacereroute_reroute]]
.`reroute()`
****
[source,php]
----
/*
$params['dry_run'] = (boolean) Simulate the operation only and return the resulting state
$params['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed
$params['retry_failed'] = (boolean) Retries allocation of shards that are blocked due to too many subsequent allocation failures
$params['metric'] = (list) Limit the information returned to the specified metrics. Defaults to all but metadata (Options = _all,blocks,metadata,nodes,routing_table,master_node,version)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
$params['body'] = (array) The definition of `commands` to perform (`move`, `cancel`, `allocate`)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->reroute($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacestate_state]]
.`state()`
****
[source,php]
----
/*
$params['metric'] = (list) Limit the information returned to the specified metrics
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['wait_for_metadata_version'] = (number) Wait for the metadata version to be equal or greater than the specified metadata version
$params['wait_for_timeout'] = (time) The maximum time to wait for wait_for_metadata_version before timing out
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->state($params);
----
****
[[Elasticsearch_Namespaces_ClusterNamespacestats_stats]]
.`stats()`
****
[source,php]
----
/*
$params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['timeout'] = (time) Explicit operation timeout
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->cluster()->stats($params);
----
****
docs/build/Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc 0000644 00000004145 14221060012 0021753 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_DanglingIndicesNamespace]]
=== Elasticsearch\Namespaces\DanglingIndicesNamespace
Class DanglingIndicesNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
[[Elasticsearch_Namespaces_DanglingIndicesNamespacedeleteDanglingIndex_deleteDanglingIndex]]
.`deleteDanglingIndex()`
****
[source,php]
----
/*
$params['index_uuid'] = (string) The UUID of the dangling index
$params['accept_data_loss'] = (boolean) Must be set to true in order to delete the dangling index
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->danglingindices()->deleteDanglingIndex($params);
----
****
[[Elasticsearch_Namespaces_DanglingIndicesNamespaceimportDanglingIndex_importDanglingIndex]]
.`importDanglingIndex()`
****
[source,php]
----
/*
$params['index_uuid'] = (string) The UUID of the dangling index
$params['accept_data_loss'] = (boolean) Must be set to true in order to import the dangling index
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->danglingindices()->importDanglingIndex($params);
----
****
[[Elasticsearch_Namespaces_DanglingIndicesNamespacelistDanglingIndices_listDanglingIndices]]
.`listDanglingIndices()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->danglingindices()->listDanglingIndices($params);
----
****
docs/build/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc 0000644 00000014331 14221060012 0024430 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespace]]
=== Elasticsearch\Namespaces\DataFrameTransformDeprecatedNamespace
Class DataFrameTransformDeprecatedNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacedeleteTransform_deleteTransform]]
.`deleteTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the transform to delete
$params['force'] = (boolean) When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->deleteTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacegetTransform_getTransform]]
.`getTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
$params['from'] = (int) skips a number of transform configs, defaults to 0
$params['size'] = (int) specifies a max number of transforms to get, defaults to 100
$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->getTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacegetTransformStats_getTransformStats]]
.`getTransformStats()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms
$params['from'] = (number) skips a number of transform stats, defaults to 0
$params['size'] = (number) specifies a max number of transform stats to get, defaults to 100
$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->getTransformStats($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacepreviewTransform_previewTransform]]
.`previewTransform()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->previewTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespaceputTransform_putTransform]]
.`putTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the new transform.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->putTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacestartTransform_startTransform]]
.`startTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the transform to start
$params['timeout'] = (time) Controls the time to wait for the transform to start
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->startTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacestopTransform_stopTransform]]
.`stopTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the transform to stop
$params['wait_for_completion'] = (boolean) Whether to wait for the transform to fully stop before returning or not. Default to false
$params['timeout'] = (time) Controls the time to wait until the transform has stopped. Default to 30 seconds
$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->stopTransform($params);
----
****
[[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespaceupdateTransform_updateTransform]]
.`updateTransform()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['transform_id'] = (string) The id of the transform.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->dataframetransformdeprecated()->updateTransform($params);
----
****
docs/build/Elasticsearch/Namespaces/EnrichNamespace.asciidoc 0000644 00000004431 14221060012 0020137 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_EnrichNamespace]]
=== Elasticsearch\Namespaces\EnrichNamespace
Class EnrichNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_EnrichNamespacedeletePolicy_deletePolicy]]
.`deletePolicy()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the enrich policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->enrich()->deletePolicy($params);
----
****
[[Elasticsearch_Namespaces_EnrichNamespaceexecutePolicy_executePolicy]]
.`executePolicy()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the enrich policy
$params['wait_for_completion'] = (boolean) Should the request should block until the execution is complete. (Default = true)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->enrich()->executePolicy($params);
----
****
[[Elasticsearch_Namespaces_EnrichNamespacegetPolicy_getPolicy]]
.`getPolicy()`
****
[source,php]
----
/*
$params['name'] = (list) A comma-separated list of enrich policy names
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->enrich()->getPolicy($params);
----
****
[[Elasticsearch_Namespaces_EnrichNamespaceputPolicy_putPolicy]]
.`putPolicy()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the enrich policy
$params['body'] = (array) The enrich policy to register (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->enrich()->putPolicy($params);
----
****
[[Elasticsearch_Namespaces_EnrichNamespacestats_stats]]
.`stats()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->enrich()->stats($params);
----
****
docs/build/Elasticsearch/Namespaces/EqlNamespace.asciidoc 0000644 00000004625 14221060012 0017455 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_EqlNamespace]]
=== Elasticsearch\Namespaces\EqlNamespace
Class EqlNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
[[Elasticsearch_Namespaces_EqlNamespacedelete_delete]]
.`delete()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->eql()->delete($params);
----
****
[[Elasticsearch_Namespaces_EqlNamespaceget_get]]
.`get()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['id'] = (string) The async search ID
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
$params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->eql()->get($params);
----
****
[[Elasticsearch_Namespaces_EqlNamespacesearch_search]]
.`search()`
*NOTE:* This API is BETA and may change in ways that are not backwards compatible
****
[source,php]
----
/*
$params['index'] = (string) The name of the index to scope the operation
$params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response
$params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false)
$params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d)
$params['body'] = (array) Eql request body. Use the `query` to limit the query scope. (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->eql()->search($params);
----
****
docs/build/Elasticsearch/Namespaces/GraphNamespace.asciidoc 0000644 00000001740 14221060012 0017770 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_GraphNamespace]]
=== Elasticsearch\Namespaces\GraphNamespace
Class GraphNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
[[Elasticsearch_Namespaces_GraphNamespaceexplore_explore]]
.`explore()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required)
$params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
$params['routing'] = (string) Specific routing value
$params['timeout'] = (time) Explicit operation timeout
$params['body'] = (array) Graph Query DSL
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->graph()->explore($params);
----
****
docs/build/Elasticsearch/Namespaces/IlmNamespace.asciidoc 0000644 00000010407 14221060012 0017450 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_IlmNamespace]]
=== Elasticsearch\Namespaces\IlmNamespace
Class IlmNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_IlmNamespacedeleteLifecycle_deleteLifecycle]]
.`deleteLifecycle()`
****
[source,php]
----
/*
$params['policy'] = (string) The name of the index lifecycle policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->deleteLifecycle($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespaceexplainLifecycle_explainLifecycle]]
.`explainLifecycle()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index to explain
$params['only_managed'] = (boolean) filters the indices included in the response to ones managed by ILM
$params['only_errors'] = (boolean) filters the indices included in the response to ones in an ILM error state, implies only_managed
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->explainLifecycle($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespacegetLifecycle_getLifecycle]]
.`getLifecycle()`
****
[source,php]
----
/*
$params['policy'] = (string) The name of the index lifecycle policy
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->getLifecycle($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespacegetStatus_getStatus]]
.`getStatus()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->getStatus($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespacemoveToStep_moveToStep]]
.`moveToStep()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index whose lifecycle step is to change
$params['body'] = (array) The new lifecycle step to move to
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->moveToStep($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespaceputLifecycle_putLifecycle]]
.`putLifecycle()`
****
[source,php]
----
/*
$params['policy'] = (string) The name of the index lifecycle policy
$params['body'] = (array) The lifecycle policy definition to register
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->putLifecycle($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespaceremovePolicy_removePolicy]]
.`removePolicy()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index to remove policy on
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->removePolicy($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespaceretry_retry]]
.`retry()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the indices (comma-separated) whose failed lifecycle step is to be retry
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->retry($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespacestart_start]]
.`start()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->start($params);
----
****
[[Elasticsearch_Namespaces_IlmNamespacestop_stop]]
.`stop()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ilm()->stop($params);
----
****
docs/build/Elasticsearch/Namespaces/IndicesNamespace.asciidoc 0000644 00000110577 14221060012 0020316 0 ustar 00 [discrete]
[[Elasticsearch_Namespaces_IndicesNamespace]]
=== Elasticsearch\Namespaces\IndicesNamespace
Class IndicesNamespace
Generated running $ php util/GenerateEndpoints.php 7.4.2
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_IndicesNamespaceanalyze_analyze]]
.`analyze()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index to scope the operation
$params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->analyze($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceclearCache_clearCache]]
.`clearCache()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index name to limit the operation
$params['fielddata'] = (boolean) Clear field data
$params['fields'] = (list) A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
$params['query'] = (boolean) Clear query caches
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['request'] = (boolean) Clear request cache
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->clearCache($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceclone_clone]]
.`clone()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the source index to clone
$params['target'] = (string) The name of the target index to clone into
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the cloned index before the operation returns.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->clone($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceclose_close]]
.`close()`
****
[source,php]
----
/*
$params['index'] = (list) A comma separated list of indices to close
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->close($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacecreate_create]]
.`create()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the index
$params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->create($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacedelete_delete]]
.`delete()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
$params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
$params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->delete($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacedeleteAlias_deleteAlias]]
.`deleteAlias()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names (supports wildcards); use `_all` for all indices (Required)
$params['name'] = (list) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. (Required)
$params['timeout'] = (time) Explicit timestamp for the document
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->deleteAlias($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacedeleteTemplate_deleteTemplate]]
.`deleteTemplate()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the template
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->deleteTemplate($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceexists_exists]]
.`exists()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
$params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
$params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open)
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->exists($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceexistsAlias_existsAlias]]
.`existsAlias()`
****
[source,php]
----
/*
$params['name'] = (list) A comma-separated list of alias names to return (Required)
$params['index'] = (list) A comma-separated list of index names to filter aliases
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = all)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->existsAlias($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceexistsTemplate_existsTemplate]]
.`existsTemplate()`
****
[source,php]
----
/*
$params['name'] = (list) The comma separated names of the index templates
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->existsTemplate($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceexistsType_existsType]]
.`existsType()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices
$params['type'] = DEPRECATED (list) A comma-separated list of document types to check
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->existsType($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceflush_flush]]
.`flush()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
$params['force'] = (boolean) Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
$params['wait_if_ongoing'] = (boolean) If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->flush($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceflushSynced_flushSynced]]
.`flushSynced()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->flushSynced($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceforcemerge_forcemerge]]
.`forcemerge()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic)
$params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->forcemerge($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceget_get]]
.`get()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names
$params['include_type_name'] = (boolean) Whether to add the type name to the response (default: false)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false)
$params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false)
$params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,none,all) (Default = open)
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
$params['master_timeout'] = (time) Specify timeout for connection to master
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->get($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetAlias_getAlias]]
.`getAlias()`
****
[source,php]
----
/*
$params['name'] = (list) A comma-separated list of alias names to return
$params['index'] = (list) A comma-separated list of index names to filter aliases
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = all)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getAlias($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetFieldMapping_getFieldMapping]]
.`getFieldMapping()`
****
[source,php]
----
/*
$params['fields'] = (list) A comma-separated list of fields (Required)
$params['index'] = (list) A comma-separated list of index names
$params['type'] = DEPRECATED (list) A comma-separated list of document types
$params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getFieldMapping($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetMapping_getMapping]]
.`getMapping()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names
$params['type'] = DEPRECATED (list) A comma-separated list of document types
$params['include_type_name'] = (boolean) Whether to add the type name to the response (default: false)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getMapping($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetSettings_getSettings]]
.`getSettings()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['name'] = (list) The name of the settings that should be included
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open,closed)
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getSettings($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetTemplate_getTemplate]]
.`getTemplate()`
****
[source,php]
----
/*
$params['name'] = (list) The comma separated names of the index templates
$params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getTemplate($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetUpgrade_getUpgrade]]
.`getUpgrade()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getUpgrade($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceopen_open]]
.`open()`
****
[source,php]
----
/*
$params['index'] = (list) A comma separated list of indices to open
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = closed)
$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->open($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceputAlias_putAlias]]
.`putAlias()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. (Required)
$params['name'] = (string) The name of the alias to be created or updated (Required)
$params['timeout'] = (time) Explicit timestamp for the document
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['body'] = (array) The settings for the alias, such as `routing` or `filter`
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->putAlias($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceputMapping_putMapping]]
.`putMapping()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->putMapping($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceputSettings_putSettings]]
.`putSettings()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['timeout'] = (time) Explicit operation timeout
$params['preserve_existing'] = (boolean) Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['flat_settings'] = (boolean) Return settings in flat format (default: false)
$params['body'] = (array) The index settings to be updated (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->putSettings($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceputTemplate_putTemplate]]
.`putTemplate()`
****
[source,php]
----
/*
$params['name'] = (string) The name of the template
$params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->putTemplate($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacerecovery_recovery]]
.`recovery()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['detailed'] = (boolean) Whether to display detailed information about shard recovery (Default = false)
$params['active_only'] = (boolean) Display only those recoveries that are currently on-going (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->recovery($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacerefresh_refresh]]
.`refresh()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->refresh($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacerollover_rollover]]
.`rollover()`
****
[source,php]
----
/*
$params['alias'] = (string) The name of the alias to rollover (Required)
$params['new_index'] = (string) The name of the rollover index
$params['include_type_name'] = (boolean) Whether a type should be included in the body of the mappings.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->rollover($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacesegments_segments]]
.`segments()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['verbose'] = (boolean) Includes detailed memory usage by Lucene. (Default = false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->segments($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceshardStores_shardStores]]
.`shardStores()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for (Options = green,yellow,red,all)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->shardStores($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceshrink_shrink]]
.`shrink()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the source index to shrink
$params['target'] = (string) The name of the target index to shrink into
$params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false)
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->shrink($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacesplit_split]]
.`split()`
****
[source,php]
----
/*
$params['index'] = (string) The name of the source index to split
$params['target'] = (string) The name of the target index to split into
$params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false)
$params['timeout'] = (time) Explicit operation timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->split($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacestats_stats]]
.`stats()`
****
[source,php]
----
/*
$params['metric'] = (list) Limit the information returned the specific metrics.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->stats($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceupdateAliases_updateAliases]]
.`updateAliases()`
****
[source,php]
----
/*
$params['timeout'] = (time) Request timeout
$params['master_timeout'] = (time) Specify timeout for connection to master
$params['body'] = (array) The definition of `actions` to perform (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->updateAliases($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespaceupgrade_upgrade]]
.`upgrade()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['wait_for_completion'] = (boolean) Specify whether the request should block until the all segments are upgraded (default: false)
$params['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->upgrade($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacevalidateQuery_validateQuery]]
.`validateQuery()`
****
[source,php]
----
/*
$params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
$params['type'] = DEPRECATED (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
$params['explain'] = (boolean) Return detailed information about the error
$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
$params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open)
$params['q'] = (string) Query in the Lucene query string syntax
$params['analyzer'] = (string) The analyzer to use for the query string
$params['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
$params['default_operator'] = (enum) The default operator for query string query (AND or OR) (Options = AND,OR) (Default = OR)
$params['df'] = (string) The field to use as default where no field prefix is given in the query string
$params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
$params['rewrite'] = (boolean) Provide a more detailed explanation showing the actual Lucene query that will be executed.
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->validateQuery($params);
----
****
[[Elasticsearch_Namespaces_IndicesNamespacegetAliases_getAliases]]
.`getAliases()`
****
[source,php]
----
/*
Alias function to getAlias()
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->indices()->getAliases($params);
----
****
docs/build/Elasticsearch/Namespaces/IngestNamespace.asciidoc 0000644 00000005423 14221060012 0020162 0 ustar 00 [discrete]
[[Elasticsearch_Namespaces_IngestNamespace]]
=== Elasticsearch\Namespaces\IngestNamespace
Class IngestNamespace
Generated running $ php util/GenerateEndpoints.php 7.4.2
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_IngestNamespacedeletePipeline_deletePipeline]]
.`deletePipeline()`
****
[source,php]
----
/*
$params['id'] = (string) Pipeline ID
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest()->deletePipeline($params);
----
****
[[Elasticsearch_Namespaces_IngestNamespacegetPipeline_getPipeline]]
.`getPipeline()`
****
[source,php]
----
/*
$params['id'] = (string) Comma separated list of pipeline ids. Wildcards supported
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest()->getPipeline($params);
----
****
[[Elasticsearch_Namespaces_IngestNamespaceprocessorGrok_processorGrok]]
.`processorGrok()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest()->processorGrok($params);
----
****
[[Elasticsearch_Namespaces_IngestNamespaceputPipeline_putPipeline]]
.`putPipeline()`
****
[source,php]
----
/*
$params['id'] = (string) Pipeline ID
$params['master_timeout'] = (time) Explicit operation timeout for connection to master node
$params['timeout'] = (time) Explicit operation timeout
$params['body'] = (array) The ingest definition (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest()->putPipeline($params);
----
****
[[Elasticsearch_Namespaces_IngestNamespacesimulate_simulate]]
.`simulate()`
****
[source,php]
----
/*
$params['id'] = (string) Pipeline ID
$params['verbose'] = (boolean) Verbose mode. Display data output for each processor in executed pipeline (Default = false)
$params['body'] = (array) The simulate definition (Required)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->ingest()->simulate($params);
----
****
docs/build/Elasticsearch/Namespaces/LicenseNamespace.asciidoc 0000644 00000006350 14221060012 0020313 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_LicenseNamespace]]
=== Elasticsearch\Namespaces\LicenseNamespace
Class LicenseNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
[[Elasticsearch_Namespaces_LicenseNamespacedelete_delete]]
.`delete()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->delete($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespaceget_get]]
.`get()`
****
[source,php]
----
/*
$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
$params['accept_enterprise'] = (boolean) If the active license is an enterprise license, return type as 'enterprise' (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->get($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespacegetBasicStatus_getBasicStatus]]
.`getBasicStatus()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->getBasicStatus($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespacegetTrialStatus_getTrialStatus]]
.`getTrialStatus()`
****
[source,php]
----
/*
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->getTrialStatus($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespacepost_post]]
.`post()`
****
[source,php]
----
/*
$params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
$params['body'] = (array) licenses to be installed
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->post($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespacepostStartBasic_postStartBasic]]
.`postStartBasic()`
****
[source,php]
----
/*
$params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->postStartBasic($params);
----
****
[[Elasticsearch_Namespaces_LicenseNamespacepostStartTrial_postStartTrial]]
.`postStartTrial()`
****
[source,php]
----
/*
$params['type'] = (string) The type of trial license to generate (default: "trial")
$params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false)
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->license()->postStartTrial($params);
----
****
docs/build/Elasticsearch/Namespaces/MigrationNamespace.asciidoc 0000644 00000001204 14221060012 0020653 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_MigrationNamespace]]
=== Elasticsearch\Namespaces\MigrationNamespace
Class MigrationNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
[[Elasticsearch_Namespaces_MigrationNamespacedeprecations_deprecations]]
.`deprecations()`
****
[source,php]
----
/*
$params['index'] = (string) Index pattern
*/
$params = [
// ...
];
$client = ClientBuilder::create()->build();
$response = $client->migration()->deprecations($params);
----
****
docs/build/Elasticsearch/Namespaces/MlNamespace.asciidoc 0000644 00000122420 14221060012 0017276 0 ustar 00
[discrete]
[[Elasticsearch_Namespaces_MlNamespace]]
=== Elasticsearch\Namespaces\MlNamespace
Class MlNamespace
Generated running $ php util/GenerateEndpoints.php 7.9
*Methods*
The class defines the following methods:
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <>
* <