2
2
== Namespaces
3
3
4
4
The client has a number of "namespaces", which generally expose administrative
5
- functionality. The namespaces correspond to the various administrative endpoints
6
- in Elasticsearch. This is a complete list of namespaces:
5
+ functionality. The namespaces correspond to the various administrative endpoints
6
+ in {es}. This is a complete list of namespaces:
7
7
8
8
9
9
[width="40%",options="header",frame="topbot"]
10
10
|============================
11
- | Namespace | Functionality
11
+ | Namespace | Functionality
12
12
| `indices()` | Index-centric stats and info
13
13
| `nodes()` | Node-centric stats and info
14
14
| `cluster()` | Cluster-centric stats and info
15
15
| `snapshot()` | Methods to snapshot/restore your cluster and indices
16
16
| `cat()` | Access to the Cat API (which is generally used standalone from the command line
17
17
|============================
18
18
19
- Some methods are available in several different namespaces, which give you
20
- the same information but grouped into different contexts. To see how these
19
+ Some methods are available in several different namespaces, which give you the
20
+ same information but grouped into different contexts. To see how these
21
21
namespaces work, let's look at the `_stats` output:
22
22
23
23
@@ -39,8 +39,8 @@ $response = $client->cluster()->stats();
39
39
----
40
40
{zwsp} +
41
41
42
- As you can see, the same `stats()` call is made through three different
43
- namespaces. Sometimes the methods require parameters. These parameters work
42
+ As you can see, the same `stats()` call is made through three different
43
+ namespaces. Sometimes the methods require parameters. These parameters work
44
44
just like any other method in the library.
45
45
46
46
For example, we can requests index stats about a specific index, or multiple
@@ -60,7 +60,7 @@ $response = $client->indices()->stats($params);
60
60
----
61
61
{zwsp} +
62
62
63
- As another example, here is how you might add an alias to an existing index:
63
+ The following example shows how you can add an alias to an existing index:
64
64
65
65
[source,php]
66
66
----
@@ -77,6 +77,7 @@ $params['body'] = array(
77
77
$client->indices()->updateAliases($params);
78
78
----
79
79
80
- Notice how both the `stats` calls and the updateAlias took a variety of parameters,
81
- 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.
80
+ Notice how both the `stats` calls and the updateAlias took a variety of
81
+ parameters, each according to what the particular API requires. The `stats` API
82
+ only requires an index name(s), while the `updateAlias` requires a body of
83
+ actions.
0 commit comments