Skip to content

Commit 68e3e16

Browse files
mhujerpolyfractal
authored andcommitted
[DOCS] Add note about separate X-Pack library to README (#694)
* README typos * README: Add note about XPack library
1 parent 418f3fb commit 68e3e16

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ elasticsearch-php
66

77
Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because of this it tries to be opinion-free and very extendable.
88

9-
To maintain consistency across all the low-level clients (Ruby, Python, etc), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array.
9+
To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array.
1010

1111

1212
Features
@@ -18,7 +18,11 @@ Features
1818
- Load balancing (with pluggable selection strategy) across all available nodes. Defaults to round-robin
1919
- Pluggable connection pools to offer different connection strategies
2020
- Generalized, pluggable architecture - most components can be replaced with your own custom class if specialized behavior is required
21-
- Option to use asyncronous future, which enables parallel execution of curl requests to multiple nodes
21+
- Option to use asynchronous future, which enables parallel execution of curl requests to multiple nodes
22+
23+
24+
**Note:** If you want to use X-Pack API, you need to install an optional extension [elasticsearch/xpack](https://github.com/elastic/elasticsearch-x-pack-php).
25+
2226

2327
Version Matrix
2428
--------------
@@ -35,7 +39,7 @@ Version Matrix
3539
- If you are using Elasticsearch 5.x , use Elasticsearch-PHP 5.0 branch.
3640
- If you are using Elasticsearch 1.x or 2.x, prefer using the Elasticsearch-PHP 2.0 branch. The 1.0 branch is compatible however.
3741
- If you are using a version older than 1.0, you must install the `0.4` Elasticsearch-PHP branch. Since ES 0.90.x and below is now EOL, the corresponding `0.4` branch will not receive any more development or bugfixes. Please upgrade.
38-
- You should never use Elasticsearch-PHP Master branch, as it tracks Elasticearch master and may contain incomplete features or breaks in backwards compat. Only use ES-PHP master if you are developing against ES master for some reason.
42+
- You should never use Elasticsearch-PHP Master branch, as it tracks Elasticsearch master and may contain incomplete features or breaks in backwards compatibility. Only use ES-PHP master if you are developing against ES master for some reason.
3943

4044
Documentation
4145
--------------
@@ -45,7 +49,7 @@ Installation via Composer
4549
-------------------------
4650
The recommended method to install _Elasticsearch-PHP_ is through [Composer](http://getcomposer.org).
4751

48-
1. Add ``elasticsearch/elasticsearch`` as a dependency in your project's ``composer.json`` file (change version to suit your version of Elasticsearch):
52+
1. Add `elasticsearch/elasticsearch` as a dependency in your project's `composer.json` file (change version to suit your version of Elasticsearch):
4953

5054
```json
5155
{
@@ -69,7 +73,7 @@ The recommended method to install _Elasticsearch-PHP_ is through [Composer](http
6973

7074
4. Require Composer's autoloader
7175

72-
Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:
76+
Composer also prepares an autoload file that's capable of autoloading all the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:
7377

7478
```php
7579
<?php
@@ -149,7 +153,7 @@ $response = $client->get($params);
149153
print_r($response);
150154
```
151155

152-
The response contains some metadata (index, type, etc) as well as a `_source` field...this is the original document
156+
The response contains some metadata (index, type, etc.) as well as a `_source` field...this is the original document
153157
that you sent to Elasticsearch.
154158

155159
```php
@@ -202,7 +206,7 @@ $response = $client->search($params);
202206
print_r($response);
203207
```
204208

205-
The response is a little different from the previous responses. We see some metadata (`took`, `timed_out`, etc) and
209+
The response is a little different from the previous responses. We see some metadata (`took`, `timed_out`, etc.) and
206210
an array named `hits`. This represents your search results. Inside of `hits` is another array named `hits`, which contains
207211
individual search results:
208212

@@ -345,9 +349,9 @@ $client = $builder->build();
345349
Wrap up
346350
=======
347351

348-
That was just a crash-course overview of the client and it's syntax. If you are familiar with elasticsearch, you'll notice that the methods are named just like REST endpoints.
352+
That was just a crash-course overview of the client and its syntax. If you are familiar with Elasticsearch, you'll notice that the methods are named just like REST endpoints.
349353

350-
You'll also notice that the client is configured in a manner that facilitates easy discovery via the IDE. All core actions are available under the `$client` object (indexing, searching, getting, etc). Index and cluster management are located under the `$client->indices()` and `$client->cluster()` objects, respectively.
354+
You'll also notice that the client is configured in a manner that facilitates easy discovery via the IDE. All core actions are available under the `$client` object (indexing, searching, getting, etc.). Index and cluster management are located under the `$client->indices()` and `$client->cluster()` objects, respectively.
351355

352356
Check out the rest of the [Documentation](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/index.html) to see how the entire client works.
353357

0 commit comments

Comments
 (0)