Skip to content

Commit c4cf003

Browse files
a-roussospolyfractal
authored andcommitted
[DOCS] Documentation fixes for 5.0 (typos, etc.) (#543)
* [DOCS] Removed apostrophe * [DOCS] Fixed typos, added periods * [DOCS] Fixed typos * [DOCS] Fixed typos/formatting * [DOCS] Fixed wording, typos * [DOCS] Added period * [DOCS] Fixed typos * [DOCS] Fixed typo * [DOCS] Fixed typos/wording * [DOCS] Fixed wording a bit
1 parent 8ec26ba commit c4cf003

10 files changed

+25
-25
lines changed

docs/breaking-changes.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Breaking changes from 2.x
22

3-
- Indices/Analyze Endpoint: `filters` and `char_filters` URI parameters have renamed to `filter` and `char_filter` respectively
3+
- Indices/Analyze Endpoint: `filters` and `char_filters` URI parameters have been renamed to `filter` and `char_filter` respectively
44
- SearchExists endpoint has been removed (use `size=0` and `terminate_after=1` instead)
55
- Warmers have been removed because they are no longer useful
66
- Indices/Optimize Endpoint has been removed (use `_forcemerge` instead)

docs/configuration.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ methods run into problems with certain edge-cases. For example, `filter_var()`
5858
Basic Auth's password contains special characters such as a pound sign (`#`) or question-marks (`?`).
5959

6060
For this reason, the client supports an extended host syntax which provides greater control over host initialization.
61-
None of the components are validated, so edge-cases like underscores domain names will not cause problems.
61+
None of the components are validated, so edge-cases like underscores in domain names will not cause problems.
6262

6363
The extended syntax is an array of parameters for each host:
6464

@@ -227,7 +227,7 @@ $client = ClientBuilder::create() // Instantiate a new ClientBuilder
227227

228228
Elasticsearch-PHP uses an interchangeable HTTP transport layer called https://github.com/guzzle/RingPHP/[RingPHP]. This
229229
allows the client to construct a generic HTTP request, then pass it to the transport layer to execute. The actual execution
230-
details are hidden from the client and modular, so that you can choose from several HTTP handlers depending on your needs.
230+
details are hidden from the client and it is modular, so that you can choose from several HTTP handlers depending on your needs.
231231

232232
The default handler that the client uses is a combination handler. When executing in synchronous mode, the handler
233233
uses `CurlHandler`, which executes single curl calls. These are very fast for single requests. When asynchronous (future)

docs/connection-pool.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Note that the implementation is specified via a namespace path to the class.
6060

6161
=== simpleConnectionPool
6262

63-
The `SimpleConnectionPool` simply returns the next node as specified by the Selector; it does not perform track
63+
The `SimpleConnectionPool` simply returns the next node as specified by the Selector; it does not track
6464
the "liveness" of nodes. This pool will return nodes whether they are alive or dead. It is just a simple pool of static
6565
hosts.
6666

@@ -81,7 +81,7 @@ Note that the implementation is specified via a namespace path to the class.
8181

8282
Unlike the two previous static connection pools, this one is dynamic. The user provides a seed list of hosts, which the
8383
client uses to "sniff" and discover the rest of the cluster. It achieves this through the Cluster State API. As new
84-
nodes are added or removed from the cluster, the client will update it's pool of active connections.
84+
nodes are added or removed from the cluster, the client will update its pool of active connections.
8585

8686
To use the `SniffingConnectionPool`:
8787

@@ -195,7 +195,7 @@ Sniffing is a relatively lightweight operation (one API call to `/_cluster/state
195195
it may be a non-negligible overhead for certain PHP applications. The average PHP script will likely load the client,
196196
execute a few queries and then close. Imagine this script being called 1000 times per second: the sniffing connection
197197
pool will perform the sniffing and pinging process 1000 times per second. The sniffing process will add a large
198-
amount of overhead
198+
amount of overhead.
199199

200200
In reality, if your script only executes a few queries, the sniffing concept is _too_ robust. It tends to be more
201201
useful in long-lived processes which potentially "out-live" a static list.

docs/crud.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
When you add documents to Elasticsearch, you index JSON documents. This maps naturally to PHP associative arrays, since
55
they can easily be encoded in JSON. Therefore, in Elasticsearch-PHP you create and pass associative arrays to the client
6-
for indexing. There are several methods of ingesting data into Elasticsearch, which we will cover here
6+
for indexing. There are several methods of ingesting data into Elasticsearch, which we will cover here.
77

88
=== Single document indexing
99

@@ -133,7 +133,7 @@ if (!empty($params['body'])) {
133133

134134
Elasticsearch provides realtime GETs of documents. This means that as soon as the document has been indexed and your
135135
client receives an acknowledgement, you can immediately retrieve the document from any shard. Get operations are
136-
performed by requesting a document by it's full `index/type/id` path:
136+
performed by requesting a document by its full `index/type/id` path:
137137

138138
[source,php]
139139
----
@@ -156,7 +156,7 @@ update to just some fields (either changing an existing field, or adding new fie
156156
=== Partial document update
157157

158158
If you want to partially update a document (e.g. change an existing field, or add a new one) you can do so by specifying
159-
the `doc` in the `body` parameter. This will merge the fields in `doc` with the existing document
159+
the `doc` in the `body` parameter. This will merge the fields in `doc` with the existing document:
160160

161161

162162
[source,php]

docs/futures.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ to the cluster), which can have a dramatic impact on performance and throughput.
66

77
PHP is fundamentally single-threaded, however libcurl provides functionality called the "multi interface". This allows
88
languages like PHP to gain concurrency by providing a batch of requests to process. The batch is executed in a parallel
9-
by the underlying multithreaded libcurl library, and the batch of responses is then returned to PHP.
9+
fashion by the underlying multithreaded libcurl library, and the batch of responses is then returned to PHP.
1010

11-
In a single-threaded environment, the time to execute `n` requests is the sum of those `n` request's latencies. With
11+
In a single-threaded environment, the time to execute `n` requests is the sum of those `n` requests' latencies. With
1212
the multi interface, the time to execute `n` requests is the latency of the slowest request (assuming enough handles
1313
are available to execute all requests in parallel).
1414

@@ -256,4 +256,4 @@ When operated in future mode, unwrapping of the future is left to your applicati
256256
which means the client can no longer inspect the response and return a simple true/false. Instead, you'll see the raw
257257
response from Elasticsearch and will have to take action appropriately.
258258

259-
This also applies to `ping()`.
259+
This also applies to `ping()`.

docs/installation.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
== Installation
22

3-
Elasticsearch-php only has a four requirements that you need to worry about:
3+
Elasticsearch-php only has four requirements that you need to worry about:
44

55
* PHP 5.6.6 or higher
66
* http://getcomposer.org[Composer]
77
* http://php.net/manual/en/book.curl.php[ext-curl]: the Libcurl extension for PHP (see note below)
88
* Native JSON Extensions (`ext-json`) 1.3.7 or higher
99
10-
The rest of the dependencies will automatically be downloaded and installed by Composer. Composer is a package and dependency manager for PHP. Installing elasticsearch-php with Composer is very easy
10+
The rest of the dependencies will automatically be downloaded and installed by Composer. Composer is a package and dependency manager for PHP. Installing elasticsearch-php with Composer is very easy.
1111

1212
[NOTE]
1313
.Libcurl can be replaced
1414
====
1515
The default HTTP handlers that ship with Elasticsearch-php require the PHP libcurl extension, but it is not technically
1616
required for the client to operate. If you have a host that does not have libcurl installed, you can use an
17-
alternate HTTP handler based on PHP streams. Performance _will_ suffer, as the libcurl extension is much faster
17+
alternate HTTP handler based on PHP streams. Performance _will_ suffer, as the libcurl extension is much faster.
1818
====
1919

2020
=== Version Matrix
@@ -44,7 +44,7 @@ The master branch will always track Elasticsearch master, but it is not recommen
4444
}
4545
--------------------------
4646

47-
* Install the client with composer. The first command download the `composer.phar` PHP package, and the second command invokes the installation. Composer will automatically download any required dependencies, store them in a /vendor/ directory and build an autoloader.:
47+
* Install the client with composer. The first command downloads the `composer.phar` PHP package, and the second command invokes the installation. Composer will automatically download any required dependencies, store them in a /vendor/ directory and build an autoloader.
4848
+
4949
[source,shell]
5050
--------------------------
@@ -65,15 +65,15 @@ $client = Elasticsearch\ClientBuilder::create()->build();
6565
+
6666
Client instantiation is performed with a static helper function `create()`. This creates a ClientBuilder object,
6767
which helps you to set custom configurations. When you are done configuring, you call the `build()` method to generate
68-
a `Client` object. We'll discuss configuration more in the Configuration section
68+
a `Client` object. We'll discuss configuration more in the Configuration section.
6969

7070

7171
=== --no-dev flag
7272
You'll notice that the installation command specified `--no-dev`. This prevents Composer
7373
from installing the various testing and development dependencies. For average users, there
7474
is no need to install the test suite. In particular, the development dependencies include
7575
a full copy of Elasticsearch so that tests can be run against the REST specifications. This
76-
is a rather large download for non-developers, hence the --no-dev flag
76+
is a rather large download for non-developers, hence the `--no-dev` flag
7777

7878
If you wish to contribute to development of this library, just omit the `--no-dev` flag to
7979
be able to run tests.

docs/namespaces.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ As you can see, the same `stats()` call is made through three different
4343
namespaces. Sometimes the methods require parameters. These parameters work
4444
just like any other method in the library.
4545

46-
For example, we can requests index stats about a specific index, or multiple
46+
For example, we can request index stats about a specific index, or multiple
4747
indices:
4848

4949
[source,php]
@@ -79,4 +79,4 @@ $client->indices()->updateAliases($params);
7979

8080
Notice how both the `stats` calls and the updateAlias took a variety of parameters,
8181
each according to what the particular API requires. The `stats` API only requires
82-
an index name(s), while the `updateAlias` requires a body of actions.
82+
an index name(s), while the `updateAlias` requires a body of actions.

docs/per-request-configuration.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Array
217217
=== Curl Timeouts
218218

219219
It is possible to configure per-request curl timeouts via the `timeout` and `connect_timeout` parameters. These
220-
control the client-side, curl timeouts. The `connect_timeout` paramter controls how long curl should wait for the
220+
control the client-side, curl timeouts. The `connect_timeout` parameter controls how long curl should wait for the
221221
"connect" phase to finish, while the `timeout` parameter controls how long curl should wait for the entire request
222222
to finish.
223223

@@ -268,7 +268,7 @@ $future = $client->get($params);
268268
$results = $future->wait(); // resolve the future
269269
----
270270

271-
Future mode supports two options: `true` or `'lazy'`. For more details about how asynchronous execution functions, and
271+
Future mode supports two options: `true` or `lazy`. For more details about how asynchronous execution functions, and
272272
how to work with the results, see the dedicated page on <<_future_mode>>.
273273

274274
=== SSL Encryption

docs/php_json_objects.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
A common source of confusion with the client revolves around JSON arrays and objects, and how to specify them in PHP.
55
In particular, problems are caused by empty objects and arrays of objects. This page will show you some common patterns
6-
used in Elasticsearch JSON API, and how to convert that to a PHP representation
6+
used in Elasticsearch JSON API, and how to convert that to a PHP representation.
77

88
=== Empty Objects
99

@@ -158,4 +158,4 @@ $results = $client->search($params);
158158
----
159159
<1> This encodes the array of objects: `"functions" : []`
160160
<2> This encodes an object inside the array: `{ "random_score": {} }`
161-
<3> This encodes the empty JSON object: `"random_score": {}`
161+
<3> This encodes the empty JSON object: `"random_score": {}`

docs/quickstart.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Array
258258

259259
=== Wrap up
260260

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

264264
You'll also notice that the client is configured in a manner that facilitates easy discovery via your IDE. All core

0 commit comments

Comments
 (0)