Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/hopeinstoughton_www/vendor/elasticsearch/elasticsearch/docs/ |
Upload File : |
[[namespaces]]
=== Namespaces
The client has a number of "namespaces", which generally expose administrative
functionality. The namespaces correspond to the various administrative endpoints
in {es}. This is a complete list of namespaces:
[width="40%",options="header",frame="topbot"]
|============================
| Namespace | Functionality
| `asyncSearch()` | Provide asyncronous search
| `autoscaling()` | Autoscaling features
| `cat()` | Compact and aligned text (CAT), mainly for terminal
| `ccr()` | Cross-cluster replication operations
| `cluster()` | Cluster-centric stats and info
| `danglingIndices()` | Dangling indices management
| `enrich()` | Enrich policy management
| `eql()` | Event Query Language
| `features()` | Manage features provided by Elasticsearch and plugins
| `fleet()` | Fleet’s use of Elasticsearch (experimental)
| `graph()` | Graph explore for documents and terms
| `ilm()` | Index lifecycle management (ILM)
| `indices()` | Index-centric stats and info
| `ingest()` | Ingest pipelines and processors
| `license()` | License management
| `logStash()` | Manage pipelines used by Logstash Central Management
| `migration()` | Designed for indirect use by Kibana’s Upgrade Assistant
| `ml()` | Machine learning features
| `monitoring()` | Monitoring features
| `monitoring()` | Monitoring features
| `nodes()` | Node-centric stats and info
| `rollup()` | Rollup features
| `searchableSnapshots()` | Searchable snapshots operations
| `security()` | Security features
| `shutdown()` | Prepare nodes for temporary or permanent shutdown
| `slm()` | Snapshot lifecycle management (SLM)
| `snapshot()` | Methods to snapshot/restore your cluster and indices
| `sql()` | Run SQL queries on Elasticsearch indices and data streams
| `ssl()` | SSL certificate management
| `tasks()` | Task management
| `textStructure()` | Finds the structure of text
| `transform()` | Transform features
| `watcher()` | Watcher create actions based on conditions
| `xpack()` | Retrieves information about the installed X-Pack features
|============================
Some methods are available in several different namespaces, which give you the
same information but grouped into different contexts. To see how these
namespaces work, let's look at the `_stats` output:
[source,php]
----
$client = ClientBuilder::create()->build();
// Index Stats
// Corresponds to curl -XGET localhost:9200/_stats
$response = $client->indices()->stats();
// Node Stats
// Corresponds to curl -XGET localhost:9200/_nodes/stats
$response = $client->nodes()->stats();
// Cluster Stats
// Corresponds to curl -XGET localhost:9200/_cluster/stats
$response = $client->cluster()->stats();
----
{zwsp} +
As you can see, the same `stats()` call is made through three different
namespaces. Sometimes the methods require parameters. These parameters work
just like any other method in the library.
For example, we can requests index stats about a specific index, or multiple
indices:
[source,php]
----
$client = ClientBuilder::create()->build();
// Corresponds to curl -XGET localhost:9200/my_index/_stats
$params['index'] = 'my_index';
$response = $client->indices()->stats($params);
// Corresponds to curl -XGET localhost:9200/my_index1,my_index2/_stats
$params['index'] = ['my_index1', 'my_index2'];
$response = $client->indices()->stats($params);
----
{zwsp} +
The following example shows how you can add an alias to an existing index:
[source,php]
----
$params['body'] = [
'actions' => [
[
'add' => [
'index' => 'myindex',
'alias' => 'myalias'
]
]
]
];
$client->indices()->updateAliases($params);
----
Notice how both the `stats` calls and the `updateAliases` took a variety of
parameters, each according to what the particular API requires. The `stats` API
only requires an index name(s), while the `updateAliases` requires a body of
actions.