You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can run [Elasticsearch](https://www.elastic.co/elasticsearch) and [Kibana](https://www.elastic.co/kibana) on your local machine using this command:
13
+
14
+
```bash
15
+
curl -fsSL https://elastic.co/start-local | sh
16
+
```
17
+
or **[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)**
15
18
**for a free trial of Elastic Cloud**.
16
19
17
20
## Contents
@@ -40,7 +43,7 @@ of the getting started documentation.
40
43
41
44
## Usage
42
45
43
-
The `elasticsearch-php` client offers 400+ endpoints for interacting with
46
+
The `elasticsearch-php` client offers 500+ endpoints for interacting with
44
47
Elasticsearch. A list of all these endpoints is available in the
- we changed the `Exception` model, using the namespace
103
-
`Elastic\Elasticsearch\Exception`. All the exceptions extends the
104
-
`ElasticsearchException` interface, as in 7.x
105
-
- we changed the response type of each endpoints using an
106
-
[Elasticsearch](src/Response/Elasticsearch.php) response class. This class
107
-
wraps a a [PSR-7](https://www.php-fig.org/psr/psr-7/) response allowing the
108
-
access of the body response as array or object. This means you can access the
109
-
API response as in 7.x, no BC break here! :angel:
110
-
- we changed the `ConnectionPool` in `NodePool`. The `connection` naming was
111
-
ambigous since the objects are nodes (hosts)
93
+
The 9.0.0 version of `elasticsearch-php` contains the same architecture of 8.x.
94
+
It supports [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages and
95
+
[PSR-18](https://www.php-fig.org/psr/psr-18/) for HTTP client communications.
96
+
97
+
We tried to avoid BC breaks for `9.x`, here the main changes:
98
+
99
+
-**Compatibility with Elasticsearch 9.0:** All changes and additions to Elasticsearch APIs for its 9.0 release are reflected in this release.
100
+
-**Serverless client merged in:** the `elastic/elasticsearch-serverless` client is being deprecated, and its functionality has been merged back into this client. This should have zero impact on the way the client works by default. If an endpoint is available in serverless, the PHP function will contains a `@group serverless` phpdoc attribute.
101
+
If you try to use an endpoint that is not available in serverless you will get a `410` HTTP error with a message as follows:
102
+
"this endpoint exists but is not available when running in serverless mode".
103
+
The 9.0.0 client can recognize that it is communicating with a serverless instance if you are using a URL managed by Elastic (e.g. `*.elastic.cloud`).
104
+
If you are using a proxy, the client will be able to recognize that the host is serverless from the first response. Alternatively, you can explicitly indicate that the host is serverless using the `Client::setServerless(true)` function (`false` by default).
105
+
-**New transport library with PSR-18 cURL client as default:** we've removed the Guzzle dependency from the client. By default, the built-in cURL-based HTTP client will be used if no other PSR-18 compatible clients are detected. See release [9.0.0](https://github.com/elastic/elastic-transport-php/releases/tag/v9.0.0) of elastic-transport-php.
112
106
113
107
You can have a look at the [BREAKING_CHANGES](BREAKING_CHANGES.md) file for more
0 commit comments