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
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ elasticsearch-php
6
6
7
7
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.
8
8
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.
10
10
11
11
12
12
Features
@@ -18,7 +18,11 @@ Features
18
18
- Load balancing (with pluggable selection strategy) across all available nodes. Defaults to round-robin
19
19
- Pluggable connection pools to offer different connection strategies
20
20
- 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
+
22
26
23
27
Version Matrix
24
28
--------------
@@ -35,7 +39,7 @@ Version Matrix
35
39
- If you are using Elasticsearch 5.x , use Elasticsearch-PHP 5.0 branch.
36
40
- 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.
37
41
- 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.
39
43
40
44
Documentation
41
45
--------------
@@ -45,7 +49,7 @@ Installation via Composer
45
49
-------------------------
46
50
The recommended method to install _Elasticsearch-PHP_ is through [Composer](http://getcomposer.org).
47
51
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):
49
53
50
54
```json
51
55
{
@@ -69,7 +73,7 @@ The recommended method to install _Elasticsearch-PHP_ is through [Composer](http
69
73
70
74
4. Require Composer's autoloader
71
75
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:
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
206
210
an array named `hits`. This represents your search results. Inside of `hits` is another array named `hits`, which contains
207
211
individual search results:
208
212
@@ -345,9 +349,9 @@ $client = $builder->build();
345
349
Wrap up
346
350
=======
347
351
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.
349
353
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.
351
355
352
356
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.
0 commit comments