Completed
Push — master ( 6a3ea2...b97e84 )
by Maxence
13s
created
lib/Vendor/Elastic/Elasticsearch/Transport/Adapter/Guzzle.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -19,25 +19,25 @@
 block discarded – undo
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Client\ClientInterface;
20 20
 class Guzzle implements AdapterInterface
21 21
 {
22
-    public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface
23
-    {
24
-        $guzzleConfig = [];
25
-        foreach ($config as $key => $value) {
26
-            switch ($key) {
27
-                case RequestOptions::SSL_CERT:
28
-                    $guzzleConfig[GuzzleOptions::CERT] = $value;
29
-                    break;
30
-                case RequestOptions::SSL_KEY:
31
-                    $guzzleConfig[GuzzleOptions::SSL_KEY] = $value;
32
-                    break;
33
-                case RequestOptions::SSL_VERIFY:
34
-                    $guzzleConfig[GuzzleOptions::VERIFY] = $value;
35
-                    break;
36
-                case RequestOptions::SSL_CA:
37
-                    $guzzleConfig[GuzzleOptions::VERIFY] = $value;
38
-            }
39
-        }
40
-        $class = \get_class($client);
41
-        return new $class(\array_merge($clientOptions, $guzzleConfig));
42
-    }
22
+	public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface
23
+	{
24
+		$guzzleConfig = [];
25
+		foreach ($config as $key => $value) {
26
+			switch ($key) {
27
+				case RequestOptions::SSL_CERT:
28
+					$guzzleConfig[GuzzleOptions::CERT] = $value;
29
+					break;
30
+				case RequestOptions::SSL_KEY:
31
+					$guzzleConfig[GuzzleOptions::SSL_KEY] = $value;
32
+					break;
33
+				case RequestOptions::SSL_VERIFY:
34
+					$guzzleConfig[GuzzleOptions::VERIFY] = $value;
35
+					break;
36
+				case RequestOptions::SSL_CA:
37
+					$guzzleConfig[GuzzleOptions::VERIFY] = $value;
38
+			}
39
+		}
40
+		$class = \get_class($client);
41
+		return new $class(\array_merge($clientOptions, $guzzleConfig));
42
+	}
43 43
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport\RequestOptions;
18 18
 use OCA\FullTextSearch_Elasticsearch\Vendor\GuzzleHttp\RequestOptions as GuzzleOptions;
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Client\ClientInterface;
20
-class Guzzle implements AdapterInterface
21
-{
20
+class Guzzle implements AdapterInterface {
22 21
     public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface
23 22
     {
24 23
         $guzzleConfig = [];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport\Adapter;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport\RequestOptions;
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Transport/Adapter/AdapterInterface.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Client\ClientInterface;
18 18
 interface AdapterInterface
19 19
 {
20
-    public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface;
20
+	public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface;
21 21
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport\Adapter;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Client\ClientInterface;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport\Adapter;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Client\ClientInterface;
18
-interface AdapterInterface
19
-{
18
+interface AdapterInterface {
20 19
     public function setConfig(ClientInterface $client, array $config, array $clientOptions) : ClientInterface;
21 20
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Transport/AsyncOnSuccess.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
20 20
 class AsyncOnSuccess implements OnSuccessInterface
21 21
 {
22
-    public function success(ResponseInterface $response, int $count) : Elasticsearch
23
-    {
24
-        $result = new Elasticsearch();
25
-        $result->setResponse($response, \true);
26
-        return $result;
27
-    }
22
+	public function success(ResponseInterface $response, int $count) : Elasticsearch
23
+	{
24
+		$result = new Elasticsearch();
25
+		$result->setResponse($response, \true);
26
+		return $result;
27
+	}
28 28
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Response\Elasticsearch;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Response\Elasticsearch;
18 18
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Transport\Async\OnSuccessInterface;
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
20
-class AsyncOnSuccess implements OnSuccessInterface
21
-{
20
+class AsyncOnSuccess implements OnSuccessInterface {
22 21
     public function success(ResponseInterface $response, int $count) : Elasticsearch
23 22
     {
24 23
         $result = new Elasticsearch();
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Transport/AsyncOnSuccessNoException.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
20 20
 class AsyncOnSuccessNoException implements OnSuccessInterface
21 21
 {
22
-    public function success(ResponseInterface $response, int $count) : Elasticsearch
23
-    {
24
-        $result = new Elasticsearch();
25
-        $result->setResponse($response, \false);
26
-        return $result;
27
-    }
22
+	public function success(ResponseInterface $response, int $count) : Elasticsearch
23
+	{
24
+		$result = new Elasticsearch();
25
+		$result->setResponse($response, \false);
26
+		return $result;
27
+	}
28 28
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Response\Elasticsearch;
18 18
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Transport\Async\OnSuccessInterface;
19 19
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
20
-class AsyncOnSuccessNoException implements OnSuccessInterface
21
-{
20
+class AsyncOnSuccessNoException implements OnSuccessInterface {
22 21
     public function success(ResponseInterface $response, int $count) : Elasticsearch
23 22
     {
24 23
         $result = new Elasticsearch();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Response\Elasticsearch;
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Transport/RequestOptions.php 3 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,20 +16,20 @@
 block discarded – undo
16 16
 
17 17
 final class RequestOptions
18 18
 {
19
-    /**
20
-     * Enable or sidable the SSL verification
21
-     */
22
-    public const SSL_VERIFY = 'ssl_verify';
23
-    /**
24
-     * SSL certificate
25
-     */
26
-    public const SSL_CERT = 'ssl_cert';
27
-    /**
28
-     * SSL key
29
-     */
30
-    public const SSL_KEY = 'ssl_key';
31
-    /**
32
-     * SSL Certificate Authority (CA) bundle 
33
-     */
34
-    public const SSL_CA = 'ssl_ca';
19
+	/**
20
+	 * Enable or sidable the SSL verification
21
+	 */
22
+	public const SSL_VERIFY = 'ssl_verify';
23
+	/**
24
+	 * SSL certificate
25
+	 */
26
+	public const SSL_CERT = 'ssl_cert';
27
+	/**
28
+	 * SSL key
29
+	 */
30
+	public const SSL_KEY = 'ssl_key';
31
+	/**
32
+	 * SSL Certificate Authority (CA) bundle 
33
+	 */
34
+	public const SSL_CA = 'ssl_ca';
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport;
16 16
 
17 17
 final class RequestOptions
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
 declare (strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Transport;
16 16
 
17
-final class RequestOptions
18
-{
17
+final class RequestOptions {
19 18
     /**
20 19
      * Enable or sidable the SSL verification
21 20
      */
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Traits/MessageResponseTrait.php 3 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -23,60 +23,60 @@
 block discarded – undo
23 23
  */
24 24
 trait MessageResponseTrait
25 25
 {
26
-    public function getProtocolVersion() : string
27
-    {
28
-        return $this->response->getProtocolVersion();
29
-    }
30
-    public function withProtocolVersion($version) : MessageInterface
31
-    {
32
-        return $this->response->withProtocolVersion($version);
33
-    }
34
-    public function getHeaders() : array
35
-    {
36
-        return $this->response->getHeaders();
37
-    }
38
-    public function hasHeader(string $name) : bool
39
-    {
40
-        return $this->response->hasHeader($name);
41
-    }
42
-    public function getHeader(string $name) : array
43
-    {
44
-        return $this->response->getHeader($name);
45
-    }
46
-    public function getHeaderLine(string $name) : string
47
-    {
48
-        return $this->response->getHeaderLine($name);
49
-    }
50
-    public function withHeader(string $name, $value) : MessageInterface
51
-    {
52
-        return $this->response->withHeader($name, $value);
53
-    }
54
-    public function withAddedHeader(string $name, $value) : MessageInterface
55
-    {
56
-        return $this->response->withAddedHeader($name, $value);
57
-    }
58
-    public function withoutHeader(string $name) : MessageInterface
59
-    {
60
-        return $this->response->withoutHeader($name);
61
-    }
62
-    public function getBody() : StreamInterface
63
-    {
64
-        return $this->response->getBody();
65
-    }
66
-    public function withBody(StreamInterface $body) : MessageInterface
67
-    {
68
-        return $this->response->withBody($body);
69
-    }
70
-    public function getStatusCode() : int
71
-    {
72
-        return $this->response->getStatusCode();
73
-    }
74
-    public function withStatus(int $code, string $reasonPhrase = '') : ResponseInterface
75
-    {
76
-        return $this->response->withStatus($code, $reasonPhrase);
77
-    }
78
-    public function getReasonPhrase() : string
79
-    {
80
-        return $this->response->getReasonPhrase();
81
-    }
26
+	public function getProtocolVersion() : string
27
+	{
28
+		return $this->response->getProtocolVersion();
29
+	}
30
+	public function withProtocolVersion($version) : MessageInterface
31
+	{
32
+		return $this->response->withProtocolVersion($version);
33
+	}
34
+	public function getHeaders() : array
35
+	{
36
+		return $this->response->getHeaders();
37
+	}
38
+	public function hasHeader(string $name) : bool
39
+	{
40
+		return $this->response->hasHeader($name);
41
+	}
42
+	public function getHeader(string $name) : array
43
+	{
44
+		return $this->response->getHeader($name);
45
+	}
46
+	public function getHeaderLine(string $name) : string
47
+	{
48
+		return $this->response->getHeaderLine($name);
49
+	}
50
+	public function withHeader(string $name, $value) : MessageInterface
51
+	{
52
+		return $this->response->withHeader($name, $value);
53
+	}
54
+	public function withAddedHeader(string $name, $value) : MessageInterface
55
+	{
56
+		return $this->response->withAddedHeader($name, $value);
57
+	}
58
+	public function withoutHeader(string $name) : MessageInterface
59
+	{
60
+		return $this->response->withoutHeader($name);
61
+	}
62
+	public function getBody() : StreamInterface
63
+	{
64
+		return $this->response->getBody();
65
+	}
66
+	public function withBody(StreamInterface $body) : MessageInterface
67
+	{
68
+		return $this->response->withBody($body);
69
+	}
70
+	public function getStatusCode() : int
71
+	{
72
+		return $this->response->getStatusCode();
73
+	}
74
+	public function withStatus(int $code, string $reasonPhrase = '') : ResponseInterface
75
+	{
76
+		return $this->response->withStatus($code, $reasonPhrase);
77
+	}
78
+	public function getReasonPhrase() : string
79
+	{
80
+		return $this->response->getReasonPhrase();
81
+	}
82 82
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Traits;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\MessageInterface;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
  * Proxy class for Psr\Http\Message\ResponseInterface using
22 22
  * $this->response as source object
23 23
  */
24
-trait MessageResponseTrait
25
-{
24
+trait MessageResponseTrait {
26 25
     public function getProtocolVersion() : string
27 26
     {
28 27
         return $this->response->getProtocolVersion();
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Traits/NamespaceTrait.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Traits;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints\AsyncSearch;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 /**
60 60
  * @generated This file is generated, please do not edit
61 61
  */
62
-trait NamespaceTrait
63
-{
62
+trait NamespaceTrait {
64 63
     /** The endpoint namespace storage */
65 64
     protected array $namespace;
66 65
     public function asyncSearch() : AsyncSearch
Please login to merge, or discard this patch.
Indentation   +289 added lines, -289 removed lines patch added patch discarded remove patch
@@ -60,293 +60,293 @@
 block discarded – undo
60 60
  */
61 61
 trait NamespaceTrait
62 62
 {
63
-    /** The endpoint namespace storage */
64
-    protected array $namespace;
65
-    public function asyncSearch() : AsyncSearch
66
-    {
67
-        if (!isset($this->namespace['AsyncSearch'])) {
68
-            $this->namespace['AsyncSearch'] = new AsyncSearch($this);
69
-        }
70
-        return $this->namespace['AsyncSearch'];
71
-    }
72
-    public function autoscaling() : Autoscaling
73
-    {
74
-        if (!isset($this->namespace['Autoscaling'])) {
75
-            $this->namespace['Autoscaling'] = new Autoscaling($this);
76
-        }
77
-        return $this->namespace['Autoscaling'];
78
-    }
79
-    public function cat() : Cat
80
-    {
81
-        if (!isset($this->namespace['Cat'])) {
82
-            $this->namespace['Cat'] = new Cat($this);
83
-        }
84
-        return $this->namespace['Cat'];
85
-    }
86
-    public function ccr() : Ccr
87
-    {
88
-        if (!isset($this->namespace['Ccr'])) {
89
-            $this->namespace['Ccr'] = new Ccr($this);
90
-        }
91
-        return $this->namespace['Ccr'];
92
-    }
93
-    public function cluster() : Cluster
94
-    {
95
-        if (!isset($this->namespace['Cluster'])) {
96
-            $this->namespace['Cluster'] = new Cluster($this);
97
-        }
98
-        return $this->namespace['Cluster'];
99
-    }
100
-    public function connector() : Connector
101
-    {
102
-        if (!isset($this->namespace['Connector'])) {
103
-            $this->namespace['Connector'] = new Connector($this);
104
-        }
105
-        return $this->namespace['Connector'];
106
-    }
107
-    public function danglingIndices() : DanglingIndices
108
-    {
109
-        if (!isset($this->namespace['DanglingIndices'])) {
110
-            $this->namespace['DanglingIndices'] = new DanglingIndices($this);
111
-        }
112
-        return $this->namespace['DanglingIndices'];
113
-    }
114
-    public function enrich() : Enrich
115
-    {
116
-        if (!isset($this->namespace['Enrich'])) {
117
-            $this->namespace['Enrich'] = new Enrich($this);
118
-        }
119
-        return $this->namespace['Enrich'];
120
-    }
121
-    public function eql() : Eql
122
-    {
123
-        if (!isset($this->namespace['Eql'])) {
124
-            $this->namespace['Eql'] = new Eql($this);
125
-        }
126
-        return $this->namespace['Eql'];
127
-    }
128
-    public function esql() : Esql
129
-    {
130
-        if (!isset($this->namespace['Esql'])) {
131
-            $this->namespace['Esql'] = new Esql($this);
132
-        }
133
-        return $this->namespace['Esql'];
134
-    }
135
-    public function features() : Features
136
-    {
137
-        if (!isset($this->namespace['Features'])) {
138
-            $this->namespace['Features'] = new Features($this);
139
-        }
140
-        return $this->namespace['Features'];
141
-    }
142
-    public function fleet() : Fleet
143
-    {
144
-        if (!isset($this->namespace['Fleet'])) {
145
-            $this->namespace['Fleet'] = new Fleet($this);
146
-        }
147
-        return $this->namespace['Fleet'];
148
-    }
149
-    public function graph() : Graph
150
-    {
151
-        if (!isset($this->namespace['Graph'])) {
152
-            $this->namespace['Graph'] = new Graph($this);
153
-        }
154
-        return $this->namespace['Graph'];
155
-    }
156
-    public function ilm() : Ilm
157
-    {
158
-        if (!isset($this->namespace['Ilm'])) {
159
-            $this->namespace['Ilm'] = new Ilm($this);
160
-        }
161
-        return $this->namespace['Ilm'];
162
-    }
163
-    public function indices() : Indices
164
-    {
165
-        if (!isset($this->namespace['Indices'])) {
166
-            $this->namespace['Indices'] = new Indices($this);
167
-        }
168
-        return $this->namespace['Indices'];
169
-    }
170
-    public function inference() : Inference
171
-    {
172
-        if (!isset($this->namespace['Inference'])) {
173
-            $this->namespace['Inference'] = new Inference($this);
174
-        }
175
-        return $this->namespace['Inference'];
176
-    }
177
-    public function ingest() : Ingest
178
-    {
179
-        if (!isset($this->namespace['Ingest'])) {
180
-            $this->namespace['Ingest'] = new Ingest($this);
181
-        }
182
-        return $this->namespace['Ingest'];
183
-    }
184
-    public function license() : License
185
-    {
186
-        if (!isset($this->namespace['License'])) {
187
-            $this->namespace['License'] = new License($this);
188
-        }
189
-        return $this->namespace['License'];
190
-    }
191
-    public function logstash() : Logstash
192
-    {
193
-        if (!isset($this->namespace['Logstash'])) {
194
-            $this->namespace['Logstash'] = new Logstash($this);
195
-        }
196
-        return $this->namespace['Logstash'];
197
-    }
198
-    public function migration() : Migration
199
-    {
200
-        if (!isset($this->namespace['Migration'])) {
201
-            $this->namespace['Migration'] = new Migration($this);
202
-        }
203
-        return $this->namespace['Migration'];
204
-    }
205
-    public function ml() : Ml
206
-    {
207
-        if (!isset($this->namespace['Ml'])) {
208
-            $this->namespace['Ml'] = new Ml($this);
209
-        }
210
-        return $this->namespace['Ml'];
211
-    }
212
-    public function monitoring() : Monitoring
213
-    {
214
-        if (!isset($this->namespace['Monitoring'])) {
215
-            $this->namespace['Monitoring'] = new Monitoring($this);
216
-        }
217
-        return $this->namespace['Monitoring'];
218
-    }
219
-    public function nodes() : Nodes
220
-    {
221
-        if (!isset($this->namespace['Nodes'])) {
222
-            $this->namespace['Nodes'] = new Nodes($this);
223
-        }
224
-        return $this->namespace['Nodes'];
225
-    }
226
-    public function profiling() : Profiling
227
-    {
228
-        if (!isset($this->namespace['Profiling'])) {
229
-            $this->namespace['Profiling'] = new Profiling($this);
230
-        }
231
-        return $this->namespace['Profiling'];
232
-    }
233
-    public function queryRules() : QueryRules
234
-    {
235
-        if (!isset($this->namespace['QueryRules'])) {
236
-            $this->namespace['QueryRules'] = new QueryRules($this);
237
-        }
238
-        return $this->namespace['QueryRules'];
239
-    }
240
-    public function rollup() : Rollup
241
-    {
242
-        if (!isset($this->namespace['Rollup'])) {
243
-            $this->namespace['Rollup'] = new Rollup($this);
244
-        }
245
-        return $this->namespace['Rollup'];
246
-    }
247
-    public function searchApplication() : SearchApplication
248
-    {
249
-        if (!isset($this->namespace['SearchApplication'])) {
250
-            $this->namespace['SearchApplication'] = new SearchApplication($this);
251
-        }
252
-        return $this->namespace['SearchApplication'];
253
-    }
254
-    public function searchableSnapshots() : SearchableSnapshots
255
-    {
256
-        if (!isset($this->namespace['SearchableSnapshots'])) {
257
-            $this->namespace['SearchableSnapshots'] = new SearchableSnapshots($this);
258
-        }
259
-        return $this->namespace['SearchableSnapshots'];
260
-    }
261
-    public function security() : Security
262
-    {
263
-        if (!isset($this->namespace['Security'])) {
264
-            $this->namespace['Security'] = new Security($this);
265
-        }
266
-        return $this->namespace['Security'];
267
-    }
268
-    public function shutdown() : Shutdown
269
-    {
270
-        if (!isset($this->namespace['Shutdown'])) {
271
-            $this->namespace['Shutdown'] = new Shutdown($this);
272
-        }
273
-        return $this->namespace['Shutdown'];
274
-    }
275
-    public function simulate() : Simulate
276
-    {
277
-        if (!isset($this->namespace['Simulate'])) {
278
-            $this->namespace['Simulate'] = new Simulate($this);
279
-        }
280
-        return $this->namespace['Simulate'];
281
-    }
282
-    public function slm() : Slm
283
-    {
284
-        if (!isset($this->namespace['Slm'])) {
285
-            $this->namespace['Slm'] = new Slm($this);
286
-        }
287
-        return $this->namespace['Slm'];
288
-    }
289
-    public function snapshot() : Snapshot
290
-    {
291
-        if (!isset($this->namespace['Snapshot'])) {
292
-            $this->namespace['Snapshot'] = new Snapshot($this);
293
-        }
294
-        return $this->namespace['Snapshot'];
295
-    }
296
-    public function sql() : Sql
297
-    {
298
-        if (!isset($this->namespace['Sql'])) {
299
-            $this->namespace['Sql'] = new Sql($this);
300
-        }
301
-        return $this->namespace['Sql'];
302
-    }
303
-    public function ssl() : Ssl
304
-    {
305
-        if (!isset($this->namespace['Ssl'])) {
306
-            $this->namespace['Ssl'] = new Ssl($this);
307
-        }
308
-        return $this->namespace['Ssl'];
309
-    }
310
-    public function synonyms() : Synonyms
311
-    {
312
-        if (!isset($this->namespace['Synonyms'])) {
313
-            $this->namespace['Synonyms'] = new Synonyms($this);
314
-        }
315
-        return $this->namespace['Synonyms'];
316
-    }
317
-    public function tasks() : Tasks
318
-    {
319
-        if (!isset($this->namespace['Tasks'])) {
320
-            $this->namespace['Tasks'] = new Tasks($this);
321
-        }
322
-        return $this->namespace['Tasks'];
323
-    }
324
-    public function textStructure() : TextStructure
325
-    {
326
-        if (!isset($this->namespace['TextStructure'])) {
327
-            $this->namespace['TextStructure'] = new TextStructure($this);
328
-        }
329
-        return $this->namespace['TextStructure'];
330
-    }
331
-    public function transform() : Transform
332
-    {
333
-        if (!isset($this->namespace['Transform'])) {
334
-            $this->namespace['Transform'] = new Transform($this);
335
-        }
336
-        return $this->namespace['Transform'];
337
-    }
338
-    public function watcher() : Watcher
339
-    {
340
-        if (!isset($this->namespace['Watcher'])) {
341
-            $this->namespace['Watcher'] = new Watcher($this);
342
-        }
343
-        return $this->namespace['Watcher'];
344
-    }
345
-    public function xpack() : Xpack
346
-    {
347
-        if (!isset($this->namespace['Xpack'])) {
348
-            $this->namespace['Xpack'] = new Xpack($this);
349
-        }
350
-        return $this->namespace['Xpack'];
351
-    }
63
+	/** The endpoint namespace storage */
64
+	protected array $namespace;
65
+	public function asyncSearch() : AsyncSearch
66
+	{
67
+		if (!isset($this->namespace['AsyncSearch'])) {
68
+			$this->namespace['AsyncSearch'] = new AsyncSearch($this);
69
+		}
70
+		return $this->namespace['AsyncSearch'];
71
+	}
72
+	public function autoscaling() : Autoscaling
73
+	{
74
+		if (!isset($this->namespace['Autoscaling'])) {
75
+			$this->namespace['Autoscaling'] = new Autoscaling($this);
76
+		}
77
+		return $this->namespace['Autoscaling'];
78
+	}
79
+	public function cat() : Cat
80
+	{
81
+		if (!isset($this->namespace['Cat'])) {
82
+			$this->namespace['Cat'] = new Cat($this);
83
+		}
84
+		return $this->namespace['Cat'];
85
+	}
86
+	public function ccr() : Ccr
87
+	{
88
+		if (!isset($this->namespace['Ccr'])) {
89
+			$this->namespace['Ccr'] = new Ccr($this);
90
+		}
91
+		return $this->namespace['Ccr'];
92
+	}
93
+	public function cluster() : Cluster
94
+	{
95
+		if (!isset($this->namespace['Cluster'])) {
96
+			$this->namespace['Cluster'] = new Cluster($this);
97
+		}
98
+		return $this->namespace['Cluster'];
99
+	}
100
+	public function connector() : Connector
101
+	{
102
+		if (!isset($this->namespace['Connector'])) {
103
+			$this->namespace['Connector'] = new Connector($this);
104
+		}
105
+		return $this->namespace['Connector'];
106
+	}
107
+	public function danglingIndices() : DanglingIndices
108
+	{
109
+		if (!isset($this->namespace['DanglingIndices'])) {
110
+			$this->namespace['DanglingIndices'] = new DanglingIndices($this);
111
+		}
112
+		return $this->namespace['DanglingIndices'];
113
+	}
114
+	public function enrich() : Enrich
115
+	{
116
+		if (!isset($this->namespace['Enrich'])) {
117
+			$this->namespace['Enrich'] = new Enrich($this);
118
+		}
119
+		return $this->namespace['Enrich'];
120
+	}
121
+	public function eql() : Eql
122
+	{
123
+		if (!isset($this->namespace['Eql'])) {
124
+			$this->namespace['Eql'] = new Eql($this);
125
+		}
126
+		return $this->namespace['Eql'];
127
+	}
128
+	public function esql() : Esql
129
+	{
130
+		if (!isset($this->namespace['Esql'])) {
131
+			$this->namespace['Esql'] = new Esql($this);
132
+		}
133
+		return $this->namespace['Esql'];
134
+	}
135
+	public function features() : Features
136
+	{
137
+		if (!isset($this->namespace['Features'])) {
138
+			$this->namespace['Features'] = new Features($this);
139
+		}
140
+		return $this->namespace['Features'];
141
+	}
142
+	public function fleet() : Fleet
143
+	{
144
+		if (!isset($this->namespace['Fleet'])) {
145
+			$this->namespace['Fleet'] = new Fleet($this);
146
+		}
147
+		return $this->namespace['Fleet'];
148
+	}
149
+	public function graph() : Graph
150
+	{
151
+		if (!isset($this->namespace['Graph'])) {
152
+			$this->namespace['Graph'] = new Graph($this);
153
+		}
154
+		return $this->namespace['Graph'];
155
+	}
156
+	public function ilm() : Ilm
157
+	{
158
+		if (!isset($this->namespace['Ilm'])) {
159
+			$this->namespace['Ilm'] = new Ilm($this);
160
+		}
161
+		return $this->namespace['Ilm'];
162
+	}
163
+	public function indices() : Indices
164
+	{
165
+		if (!isset($this->namespace['Indices'])) {
166
+			$this->namespace['Indices'] = new Indices($this);
167
+		}
168
+		return $this->namespace['Indices'];
169
+	}
170
+	public function inference() : Inference
171
+	{
172
+		if (!isset($this->namespace['Inference'])) {
173
+			$this->namespace['Inference'] = new Inference($this);
174
+		}
175
+		return $this->namespace['Inference'];
176
+	}
177
+	public function ingest() : Ingest
178
+	{
179
+		if (!isset($this->namespace['Ingest'])) {
180
+			$this->namespace['Ingest'] = new Ingest($this);
181
+		}
182
+		return $this->namespace['Ingest'];
183
+	}
184
+	public function license() : License
185
+	{
186
+		if (!isset($this->namespace['License'])) {
187
+			$this->namespace['License'] = new License($this);
188
+		}
189
+		return $this->namespace['License'];
190
+	}
191
+	public function logstash() : Logstash
192
+	{
193
+		if (!isset($this->namespace['Logstash'])) {
194
+			$this->namespace['Logstash'] = new Logstash($this);
195
+		}
196
+		return $this->namespace['Logstash'];
197
+	}
198
+	public function migration() : Migration
199
+	{
200
+		if (!isset($this->namespace['Migration'])) {
201
+			$this->namespace['Migration'] = new Migration($this);
202
+		}
203
+		return $this->namespace['Migration'];
204
+	}
205
+	public function ml() : Ml
206
+	{
207
+		if (!isset($this->namespace['Ml'])) {
208
+			$this->namespace['Ml'] = new Ml($this);
209
+		}
210
+		return $this->namespace['Ml'];
211
+	}
212
+	public function monitoring() : Monitoring
213
+	{
214
+		if (!isset($this->namespace['Monitoring'])) {
215
+			$this->namespace['Monitoring'] = new Monitoring($this);
216
+		}
217
+		return $this->namespace['Monitoring'];
218
+	}
219
+	public function nodes() : Nodes
220
+	{
221
+		if (!isset($this->namespace['Nodes'])) {
222
+			$this->namespace['Nodes'] = new Nodes($this);
223
+		}
224
+		return $this->namespace['Nodes'];
225
+	}
226
+	public function profiling() : Profiling
227
+	{
228
+		if (!isset($this->namespace['Profiling'])) {
229
+			$this->namespace['Profiling'] = new Profiling($this);
230
+		}
231
+		return $this->namespace['Profiling'];
232
+	}
233
+	public function queryRules() : QueryRules
234
+	{
235
+		if (!isset($this->namespace['QueryRules'])) {
236
+			$this->namespace['QueryRules'] = new QueryRules($this);
237
+		}
238
+		return $this->namespace['QueryRules'];
239
+	}
240
+	public function rollup() : Rollup
241
+	{
242
+		if (!isset($this->namespace['Rollup'])) {
243
+			$this->namespace['Rollup'] = new Rollup($this);
244
+		}
245
+		return $this->namespace['Rollup'];
246
+	}
247
+	public function searchApplication() : SearchApplication
248
+	{
249
+		if (!isset($this->namespace['SearchApplication'])) {
250
+			$this->namespace['SearchApplication'] = new SearchApplication($this);
251
+		}
252
+		return $this->namespace['SearchApplication'];
253
+	}
254
+	public function searchableSnapshots() : SearchableSnapshots
255
+	{
256
+		if (!isset($this->namespace['SearchableSnapshots'])) {
257
+			$this->namespace['SearchableSnapshots'] = new SearchableSnapshots($this);
258
+		}
259
+		return $this->namespace['SearchableSnapshots'];
260
+	}
261
+	public function security() : Security
262
+	{
263
+		if (!isset($this->namespace['Security'])) {
264
+			$this->namespace['Security'] = new Security($this);
265
+		}
266
+		return $this->namespace['Security'];
267
+	}
268
+	public function shutdown() : Shutdown
269
+	{
270
+		if (!isset($this->namespace['Shutdown'])) {
271
+			$this->namespace['Shutdown'] = new Shutdown($this);
272
+		}
273
+		return $this->namespace['Shutdown'];
274
+	}
275
+	public function simulate() : Simulate
276
+	{
277
+		if (!isset($this->namespace['Simulate'])) {
278
+			$this->namespace['Simulate'] = new Simulate($this);
279
+		}
280
+		return $this->namespace['Simulate'];
281
+	}
282
+	public function slm() : Slm
283
+	{
284
+		if (!isset($this->namespace['Slm'])) {
285
+			$this->namespace['Slm'] = new Slm($this);
286
+		}
287
+		return $this->namespace['Slm'];
288
+	}
289
+	public function snapshot() : Snapshot
290
+	{
291
+		if (!isset($this->namespace['Snapshot'])) {
292
+			$this->namespace['Snapshot'] = new Snapshot($this);
293
+		}
294
+		return $this->namespace['Snapshot'];
295
+	}
296
+	public function sql() : Sql
297
+	{
298
+		if (!isset($this->namespace['Sql'])) {
299
+			$this->namespace['Sql'] = new Sql($this);
300
+		}
301
+		return $this->namespace['Sql'];
302
+	}
303
+	public function ssl() : Ssl
304
+	{
305
+		if (!isset($this->namespace['Ssl'])) {
306
+			$this->namespace['Ssl'] = new Ssl($this);
307
+		}
308
+		return $this->namespace['Ssl'];
309
+	}
310
+	public function synonyms() : Synonyms
311
+	{
312
+		if (!isset($this->namespace['Synonyms'])) {
313
+			$this->namespace['Synonyms'] = new Synonyms($this);
314
+		}
315
+		return $this->namespace['Synonyms'];
316
+	}
317
+	public function tasks() : Tasks
318
+	{
319
+		if (!isset($this->namespace['Tasks'])) {
320
+			$this->namespace['Tasks'] = new Tasks($this);
321
+		}
322
+		return $this->namespace['Tasks'];
323
+	}
324
+	public function textStructure() : TextStructure
325
+	{
326
+		if (!isset($this->namespace['TextStructure'])) {
327
+			$this->namespace['TextStructure'] = new TextStructure($this);
328
+		}
329
+		return $this->namespace['TextStructure'];
330
+	}
331
+	public function transform() : Transform
332
+	{
333
+		if (!isset($this->namespace['Transform'])) {
334
+			$this->namespace['Transform'] = new Transform($this);
335
+		}
336
+		return $this->namespace['Transform'];
337
+	}
338
+	public function watcher() : Watcher
339
+	{
340
+		if (!isset($this->namespace['Watcher'])) {
341
+			$this->namespace['Watcher'] = new Watcher($this);
342
+		}
343
+		return $this->namespace['Watcher'];
344
+	}
345
+	public function xpack() : Xpack
346
+	{
347
+		if (!isset($this->namespace['Xpack'])) {
348
+			$this->namespace['Xpack'] = new Xpack($this);
349
+		}
350
+		return $this->namespace['Xpack'];
351
+	}
352 352
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Traits/ClientEndpointsTrait.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-trait ClientEndpointsTrait
27
-{
26
+trait ClientEndpointsTrait {
28 27
     /**
29 28
      * Allows to perform multiple index/update/delete operations in a single request.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +1837 added lines, -1837 removed lines patch added patch discarded remove patch
@@ -25,1841 +25,1841 @@
 block discarded – undo
25 25
  */
26 26
 trait ClientEndpointsTrait
27 27
 {
28
-    /**
29
-     * Allows to perform multiple index/update/delete operations in a single request.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
32
-     *
33
-     * @param array{
34
-     *     index: string, //  Default index for items which don't provide one
35
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
36
-     *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
37
-     *     routing: string, // Specific routing value
38
-     *     timeout: time, // Explicit operation timeout
39
-     *     type: string, // Default document type for items which don't provide one
40
-     *     _source: list, // True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
41
-     *     _source_excludes: list, // Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
42
-     *     _source_includes: list, // Default list of fields to extract and return from the _source field, can be overridden on each sub-request
43
-     *     pipeline: string, // The pipeline id to preprocess incoming documents with
44
-     *     require_alias: boolean, // Sets require_alias for all incoming documents. Defaults to unset (false)
45
-     *     require_data_stream: boolean, // When true, requires the destination to be a data stream (existing or to-be-created). Default is false
46
-     *     list_executed_pipelines: boolean, // Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)
47
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
48
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
49
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
50
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
51
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
52
-     *     body: array, // (REQUIRED) The operation definition and data (action-data pairs), separated by newlines
53
-     * } $params
54
-     *
55
-     * @throws NoNodeAvailableException if all the hosts are offline
56
-     * @throws ClientResponseException if the status code of response is 4xx
57
-     * @throws ServerResponseException if the status code of response is 5xx
58
-     *
59
-     * @return Elasticsearch|Promise
60
-     */
61
-    public function bulk(array $params = [])
62
-    {
63
-        $this->checkRequiredParameters(['body'], $params);
64
-        if (isset($params['index'])) {
65
-            $url = '/' . $this->encode($params['index']) . '/_bulk';
66
-            $method = 'POST';
67
-        } else {
68
-            $url = '/_bulk';
69
-            $method = 'POST';
70
-        }
71
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_includes', 'pipeline', 'require_alias', 'require_data_stream', 'list_executed_pipelines', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
72
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
73
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
74
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'bulk');
75
-        return $this->sendRequest($request);
76
-    }
77
-    /**
78
-     * Explicitly clears the search context for a scroll.
79
-     *
80
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html
81
-     *
82
-     * @param array{
83
-     *     scroll_id: list, //  A comma-separated list of scroll IDs to clear
84
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
85
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
86
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
87
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
88
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
89
-     *     body: array, //  A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
90
-     * } $params
91
-     *
92
-     * @throws NoNodeAvailableException if all the hosts are offline
93
-     * @throws ClientResponseException if the status code of response is 4xx
94
-     * @throws ServerResponseException if the status code of response is 5xx
95
-     *
96
-     * @return Elasticsearch|Promise
97
-     */
98
-    public function clearScroll(array $params = [])
99
-    {
100
-        if (isset($params['scroll_id'])) {
101
-            $url = '/_search/scroll/' . $this->encode($params['scroll_id']);
102
-            $method = 'DELETE';
103
-        } else {
104
-            $url = '/_search/scroll';
105
-            $method = 'DELETE';
106
-        }
107
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
108
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
109
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
110
-        $request = $this->addOtelAttributes($params, ['scroll_id'], $request, 'clear_scroll');
111
-        return $this->sendRequest($request);
112
-    }
113
-    /**
114
-     * Close a point in time
115
-     *
116
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
117
-     *
118
-     * @param array{
119
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
120
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
121
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
122
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
123
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
124
-     *     body: array, //  a point-in-time id to close
125
-     * } $params
126
-     *
127
-     * @throws NoNodeAvailableException if all the hosts are offline
128
-     * @throws ClientResponseException if the status code of response is 4xx
129
-     * @throws ServerResponseException if the status code of response is 5xx
130
-     *
131
-     * @return Elasticsearch|Promise
132
-     */
133
-    public function closePointInTime(array $params = [])
134
-    {
135
-        $url = '/_pit';
136
-        $method = 'DELETE';
137
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
138
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
139
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
140
-        $request = $this->addOtelAttributes($params, [], $request, 'close_point_in_time');
141
-        return $this->sendRequest($request);
142
-    }
143
-    /**
144
-     * Returns number of documents matching a query.
145
-     *
146
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
147
-     *
148
-     * @param array{
149
-     *     index: list, //  A comma-separated list of indices to restrict the results
150
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
151
-     *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
152
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
153
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
154
-     *     min_score: number, // Include only documents with a specific `_score` value in the result
155
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
156
-     *     routing: list, // A comma-separated list of specific routing values
157
-     *     q: string, // Query in the Lucene query string syntax
158
-     *     analyzer: string, // The analyzer to use for the query string
159
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
160
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
161
-     *     df: string, // The field to use as default where no field prefix is given in the query string
162
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
163
-     *     terminate_after: number, // The maximum count for each shard, upon reaching which the query execution will terminate early
164
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
165
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
166
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
167
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
168
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
169
-     *     body: array, //  A query to restrict the results specified with the Query DSL (optional)
170
-     * } $params
171
-     *
172
-     * @throws NoNodeAvailableException if all the hosts are offline
173
-     * @throws ClientResponseException if the status code of response is 4xx
174
-     * @throws ServerResponseException if the status code of response is 5xx
175
-     *
176
-     * @return Elasticsearch|Promise
177
-     */
178
-    public function count(array $params = [])
179
-    {
180
-        if (isset($params['index'])) {
181
-            $url = '/' . $this->encode($params['index']) . '/_count';
182
-            $method = empty($params['body']) ? 'GET' : 'POST';
183
-        } else {
184
-            $url = '/_count';
185
-            $method = empty($params['body']) ? 'GET' : 'POST';
186
-        }
187
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'min_score', 'preference', 'routing', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'terminate_after', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
188
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
189
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
190
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'count');
191
-        return $this->sendRequest($request);
192
-    }
193
-    /**
194
-     * Creates a new document in the index.
195
-     *
196
-     * Returns a 409 response when a document with a same ID already exists in the index.
197
-     *
198
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
199
-     *
200
-     * @param array{
201
-     *     id: string, // (REQUIRED) Document ID
202
-     *     index: string, // (REQUIRED) The name of the index
203
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
204
-     *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
205
-     *     routing: string, // Specific routing value
206
-     *     timeout: time, // Explicit operation timeout
207
-     *     version: number, // Explicit version number for concurrency control
208
-     *     version_type: enum, // Specific version type
209
-     *     pipeline: string, // The pipeline id to preprocess incoming documents with
210
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
211
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
212
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
213
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
214
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
215
-     *     body: array, // (REQUIRED) The document
216
-     * } $params
217
-     *
218
-     * @throws MissingParameterException if a required parameter is missing
219
-     * @throws NoNodeAvailableException if all the hosts are offline
220
-     * @throws ClientResponseException if the status code of response is 4xx
221
-     * @throws ServerResponseException if the status code of response is 5xx
222
-     *
223
-     * @return Elasticsearch|Promise
224
-     */
225
-    public function create(array $params = [])
226
-    {
227
-        $this->checkRequiredParameters(['id', 'index', 'body'], $params);
228
-        $url = '/' . $this->encode($params['index']) . '/_create/' . $this->encode($params['id']);
229
-        $method = 'PUT';
230
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
231
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
232
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
233
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'create');
234
-        return $this->sendRequest($request);
235
-    }
236
-    /**
237
-     * Removes a document from the index.
238
-     *
239
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
240
-     *
241
-     * @param array{
242
-     *     id: string, // (REQUIRED) The document ID
243
-     *     index: string, // (REQUIRED) The name of the index
244
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
245
-     *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
246
-     *     routing: string, // Specific routing value
247
-     *     timeout: time, // Explicit operation timeout
248
-     *     if_seq_no: number, // only perform the delete operation if the last operation that has changed the document has the specified sequence number
249
-     *     if_primary_term: number, // only perform the delete operation if the last operation that has changed the document has the specified primary term
250
-     *     version: number, // Explicit version number for concurrency control
251
-     *     version_type: enum, // Specific version type
252
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
253
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
254
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
255
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
256
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
257
-     * } $params
258
-     *
259
-     * @throws MissingParameterException if a required parameter is missing
260
-     * @throws NoNodeAvailableException if all the hosts are offline
261
-     * @throws ClientResponseException if the status code of response is 4xx
262
-     * @throws ServerResponseException if the status code of response is 5xx
263
-     *
264
-     * @return Elasticsearch|Promise
265
-     */
266
-    public function delete(array $params = [])
267
-    {
268
-        $this->checkRequiredParameters(['id', 'index'], $params);
269
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
270
-        $method = 'DELETE';
271
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
272
-        $headers = ['Accept' => 'application/json'];
273
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
274
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'delete');
275
-        return $this->sendRequest($request);
276
-    }
277
-    /**
278
-     * Deletes documents matching the provided query.
279
-     *
280
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
281
-     *
282
-     * @param array{
283
-     *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
284
-     *     analyzer: string, // The analyzer to use for the query string
285
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
286
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
287
-     *     df: string, // The field to use as default where no field prefix is given in the query string
288
-     *     from: number, // Starting offset (default: 0)
289
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
290
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
291
-     *     conflicts: enum, // What to do when the delete by query hits version conflicts?
292
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
293
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
294
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
295
-     *     q: string, // Query in the Lucene query string syntax
296
-     *     routing: list, // A comma-separated list of specific routing values
297
-     *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
298
-     *     search_type: enum, // Search operation type
299
-     *     search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
300
-     *     max_docs: number, // Maximum number of documents to process (default: all documents)
301
-     *     sort: list, // A comma-separated list of <field>:<direction> pairs
302
-     *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
303
-     *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
304
-     *     version: boolean, // Specify whether to return document version as part of a hit
305
-     *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
306
-     *     refresh: boolean, // Should the affected indexes be refreshed?
307
-     *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
308
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
309
-     *     scroll_size: number, // Size on the scroll request powering the delete by query
310
-     *     wait_for_completion: boolean, // Should the request should block until the delete by query is complete.
311
-     *     requests_per_second: number, // The throttle for this request in sub-requests per second. -1 means no throttle.
312
-     *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
313
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
314
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
315
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
316
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
317
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
318
-     *     body: array, // (REQUIRED) The search definition using the Query DSL
319
-     * } $params
320
-     *
321
-     * @throws MissingParameterException if a required parameter is missing
322
-     * @throws NoNodeAvailableException if all the hosts are offline
323
-     * @throws ClientResponseException if the status code of response is 4xx
324
-     * @throws ServerResponseException if the status code of response is 5xx
325
-     *
326
-     * @return Elasticsearch|Promise
327
-     */
328
-    public function deleteByQuery(array $params = [])
329
-    {
330
-        $this->checkRequiredParameters(['index', 'body'], $params);
331
-        $url = '/' . $this->encode($params['index']) . '/_delete_by_query';
332
-        $method = 'POST';
333
-        $url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
334
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
335
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
336
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'delete_by_query');
337
-        return $this->sendRequest($request);
338
-    }
339
-    /**
340
-     * Changes the number of requests per second for a particular Delete By Query operation.
341
-     *
342
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
343
-     *
344
-     * @param array{
345
-     *     task_id: string, // (REQUIRED) The task id to rethrottle
346
-     *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
347
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
348
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
349
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
350
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
351
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
352
-     * } $params
353
-     *
354
-     * @throws MissingParameterException if a required parameter is missing
355
-     * @throws NoNodeAvailableException if all the hosts are offline
356
-     * @throws ClientResponseException if the status code of response is 4xx
357
-     * @throws ServerResponseException if the status code of response is 5xx
358
-     *
359
-     * @return Elasticsearch|Promise
360
-     */
361
-    public function deleteByQueryRethrottle(array $params = [])
362
-    {
363
-        $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
364
-        $url = '/_delete_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
365
-        $method = 'POST';
366
-        $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
367
-        $headers = ['Accept' => 'application/json'];
368
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
369
-        $request = $this->addOtelAttributes($params, ['task_id'], $request, 'delete_by_query_rethrottle');
370
-        return $this->sendRequest($request);
371
-    }
372
-    /**
373
-     * Deletes a script.
374
-     *
375
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
376
-     *
377
-     * @param array{
378
-     *     id: string, // (REQUIRED) Script ID
379
-     *     timeout: time, // Explicit operation timeout
380
-     *     master_timeout: time, // Specify timeout for connection to master
381
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
382
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
383
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
384
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
385
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
386
-     * } $params
387
-     *
388
-     * @throws MissingParameterException if a required parameter is missing
389
-     * @throws NoNodeAvailableException if all the hosts are offline
390
-     * @throws ClientResponseException if the status code of response is 4xx
391
-     * @throws ServerResponseException if the status code of response is 5xx
392
-     *
393
-     * @return Elasticsearch|Promise
394
-     */
395
-    public function deleteScript(array $params = [])
396
-    {
397
-        $this->checkRequiredParameters(['id'], $params);
398
-        $url = '/_scripts/' . $this->encode($params['id']);
399
-        $method = 'DELETE';
400
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
401
-        $headers = ['Accept' => 'application/json'];
402
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
403
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'delete_script');
404
-        return $this->sendRequest($request);
405
-    }
406
-    /**
407
-     * Returns information about whether a document exists in an index.
408
-     *
409
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
410
-     *
411
-     * @param array{
412
-     *     id: string, // (REQUIRED) The document ID
413
-     *     index: string, // (REQUIRED) The name of the index
414
-     *     stored_fields: list, // A comma-separated list of stored fields to return in the response
415
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
416
-     *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
417
-     *     refresh: boolean, // Refresh the shard containing the document before performing the operation
418
-     *     routing: string, // Specific routing value
419
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
420
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
421
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
422
-     *     version: number, // Explicit version number for concurrency control
423
-     *     version_type: enum, // Specific version type
424
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
425
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
426
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
427
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
428
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
429
-     * } $params
430
-     *
431
-     * @throws MissingParameterException if a required parameter is missing
432
-     * @throws NoNodeAvailableException if all the hosts are offline
433
-     * @throws ClientResponseException if the status code of response is 4xx
434
-     * @throws ServerResponseException if the status code of response is 5xx
435
-     *
436
-     * @return Elasticsearch|Promise
437
-     */
438
-    public function exists(array $params = [])
439
-    {
440
-        $this->checkRequiredParameters(['id', 'index'], $params);
441
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
442
-        $method = 'HEAD';
443
-        $url = $this->addQueryString($url, $params, ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
444
-        $headers = ['Accept' => 'application/json'];
445
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
446
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'exists');
447
-        return $this->sendRequest($request);
448
-    }
449
-    /**
450
-     * Returns information about whether a document source exists in an index.
451
-     *
452
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
453
-     *
454
-     * @param array{
455
-     *     id: string, // (REQUIRED) The document ID
456
-     *     index: string, // (REQUIRED) The name of the index
457
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
458
-     *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
459
-     *     refresh: boolean, // Refresh the shard containing the document before performing the operation
460
-     *     routing: string, // Specific routing value
461
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
462
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
463
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
464
-     *     version: number, // Explicit version number for concurrency control
465
-     *     version_type: enum, // Specific version type
466
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
467
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
468
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
469
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
470
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
471
-     * } $params
472
-     *
473
-     * @throws MissingParameterException if a required parameter is missing
474
-     * @throws NoNodeAvailableException if all the hosts are offline
475
-     * @throws ClientResponseException if the status code of response is 4xx
476
-     * @throws ServerResponseException if the status code of response is 5xx
477
-     *
478
-     * @return Elasticsearch|Promise
479
-     */
480
-    public function existsSource(array $params = [])
481
-    {
482
-        $this->checkRequiredParameters(['id', 'index'], $params);
483
-        $url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
484
-        $method = 'HEAD';
485
-        $url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
486
-        $headers = ['Accept' => 'application/json'];
487
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
488
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'exists_source');
489
-        return $this->sendRequest($request);
490
-    }
491
-    /**
492
-     * Returns information about why a specific matches (or doesn't match) a query.
493
-     *
494
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
495
-     *
496
-     * @param array{
497
-     *     id: string, // (REQUIRED) The document ID
498
-     *     index: string, // (REQUIRED) The name of the index
499
-     *     analyze_wildcard: boolean, // Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
500
-     *     analyzer: string, // The analyzer for the query string query
501
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
502
-     *     df: string, // The default field for query string query (default: _all)
503
-     *     stored_fields: list, // A comma-separated list of stored fields to return in the response
504
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
505
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
506
-     *     q: string, // Query in the Lucene query string syntax
507
-     *     routing: string, // Specific routing value
508
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
509
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
510
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
511
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
512
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
513
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
514
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
515
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
516
-     *     body: array, //  The query definition using the Query DSL
517
-     * } $params
518
-     *
519
-     * @throws MissingParameterException if a required parameter is missing
520
-     * @throws NoNodeAvailableException if all the hosts are offline
521
-     * @throws ClientResponseException if the status code of response is 4xx
522
-     * @throws ServerResponseException if the status code of response is 5xx
523
-     *
524
-     * @return Elasticsearch|Promise
525
-     */
526
-    public function explain(array $params = [])
527
-    {
528
-        $this->checkRequiredParameters(['id', 'index'], $params);
529
-        $url = '/' . $this->encode($params['index']) . '/_explain/' . $this->encode($params['id']);
530
-        $method = empty($params['body']) ? 'GET' : 'POST';
531
-        $url = $this->addQueryString($url, $params, ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
532
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
533
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
534
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'explain');
535
-        return $this->sendRequest($request);
536
-    }
537
-    /**
538
-     * Returns the information about the capabilities of fields among multiple indices.
539
-     *
540
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
541
-     *
542
-     * @param array{
543
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
544
-     *     fields: list, // A comma-separated list of field names
545
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
546
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
547
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
548
-     *     include_unmapped: boolean, // Indicates whether unmapped fields should be included in the response.
549
-     *     filters: list, // An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
550
-     *     types: list, // Only return results for fields that have one of the types in the list
551
-     *     include_empty_fields: boolean, // Include empty fields in result
552
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
553
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
554
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
555
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
556
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
557
-     *     body: array, //  An index filter specified with the Query DSL
558
-     * } $params
559
-     *
560
-     * @throws NoNodeAvailableException if all the hosts are offline
561
-     * @throws ClientResponseException if the status code of response is 4xx
562
-     * @throws ServerResponseException if the status code of response is 5xx
563
-     *
564
-     * @return Elasticsearch|Promise
565
-     */
566
-    public function fieldCaps(array $params = [])
567
-    {
568
-        if (isset($params['index'])) {
569
-            $url = '/' . $this->encode($params['index']) . '/_field_caps';
570
-            $method = empty($params['body']) ? 'GET' : 'POST';
571
-        } else {
572
-            $url = '/_field_caps';
573
-            $method = empty($params['body']) ? 'GET' : 'POST';
574
-        }
575
-        $url = $this->addQueryString($url, $params, ['fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'include_unmapped', 'filters', 'types', 'include_empty_fields', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
576
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
577
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
578
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'field_caps');
579
-        return $this->sendRequest($request);
580
-    }
581
-    /**
582
-     * Returns a document.
583
-     *
584
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
585
-     *
586
-     * @param array{
587
-     *     id: string, // (REQUIRED) The document ID
588
-     *     index: string, // (REQUIRED) The name of the index
589
-     *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
590
-     *     stored_fields: list, // A comma-separated list of stored fields to return in the response
591
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
592
-     *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
593
-     *     refresh: boolean, // Refresh the shard containing the document before performing the operation
594
-     *     routing: string, // Specific routing value
595
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
596
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
597
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
598
-     *     version: number, // Explicit version number for concurrency control
599
-     *     version_type: enum, // Specific version type
600
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
601
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
602
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
603
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
604
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
605
-     * } $params
606
-     *
607
-     * @throws MissingParameterException if a required parameter is missing
608
-     * @throws NoNodeAvailableException if all the hosts are offline
609
-     * @throws ClientResponseException if the status code of response is 4xx
610
-     * @throws ServerResponseException if the status code of response is 5xx
611
-     *
612
-     * @return Elasticsearch|Promise
613
-     */
614
-    public function get(array $params = [])
615
-    {
616
-        $this->checkRequiredParameters(['id', 'index'], $params);
617
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
618
-        $method = 'GET';
619
-        $url = $this->addQueryString($url, $params, ['force_synthetic_source', 'stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
620
-        $headers = ['Accept' => 'application/json'];
621
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
622
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'get');
623
-        return $this->sendRequest($request);
624
-    }
625
-    /**
626
-     * Returns a script.
627
-     *
628
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
629
-     *
630
-     * @param array{
631
-     *     id: string, // (REQUIRED) Script ID
632
-     *     master_timeout: time, // Specify timeout for connection to master
633
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
634
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
635
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
636
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
637
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
638
-     * } $params
639
-     *
640
-     * @throws MissingParameterException if a required parameter is missing
641
-     * @throws NoNodeAvailableException if all the hosts are offline
642
-     * @throws ClientResponseException if the status code of response is 4xx
643
-     * @throws ServerResponseException if the status code of response is 5xx
644
-     *
645
-     * @return Elasticsearch|Promise
646
-     */
647
-    public function getScript(array $params = [])
648
-    {
649
-        $this->checkRequiredParameters(['id'], $params);
650
-        $url = '/_scripts/' . $this->encode($params['id']);
651
-        $method = 'GET';
652
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
653
-        $headers = ['Accept' => 'application/json'];
654
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
655
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'get_script');
656
-        return $this->sendRequest($request);
657
-    }
658
-    /**
659
-     * Returns all script contexts.
660
-     *
661
-     * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html
662
-     *
663
-     * @param array{
664
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
665
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
666
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
667
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
668
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
669
-     * } $params
670
-     *
671
-     * @throws NoNodeAvailableException if all the hosts are offline
672
-     * @throws ClientResponseException if the status code of response is 4xx
673
-     * @throws ServerResponseException if the status code of response is 5xx
674
-     *
675
-     * @return Elasticsearch|Promise
676
-     */
677
-    public function getScriptContext(array $params = [])
678
-    {
679
-        $url = '/_script_context';
680
-        $method = 'GET';
681
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
682
-        $headers = ['Accept' => 'application/json'];
683
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
684
-        $request = $this->addOtelAttributes($params, [], $request, 'get_script_context');
685
-        return $this->sendRequest($request);
686
-    }
687
-    /**
688
-     * Returns available script types, languages and contexts
689
-     *
690
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
691
-     *
692
-     * @param array{
693
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
694
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
695
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
696
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
697
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
698
-     * } $params
699
-     *
700
-     * @throws NoNodeAvailableException if all the hosts are offline
701
-     * @throws ClientResponseException if the status code of response is 4xx
702
-     * @throws ServerResponseException if the status code of response is 5xx
703
-     *
704
-     * @return Elasticsearch|Promise
705
-     */
706
-    public function getScriptLanguages(array $params = [])
707
-    {
708
-        $url = '/_script_language';
709
-        $method = 'GET';
710
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
711
-        $headers = ['Accept' => 'application/json'];
712
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
713
-        $request = $this->addOtelAttributes($params, [], $request, 'get_script_languages');
714
-        return $this->sendRequest($request);
715
-    }
716
-    /**
717
-     * Returns the source of a document.
718
-     *
719
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
720
-     *
721
-     * @param array{
722
-     *     id: string, // (REQUIRED) The document ID
723
-     *     index: string, // (REQUIRED) The name of the index
724
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
725
-     *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
726
-     *     refresh: boolean, // Refresh the shard containing the document before performing the operation
727
-     *     routing: string, // Specific routing value
728
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
729
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
730
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
731
-     *     version: number, // Explicit version number for concurrency control
732
-     *     version_type: enum, // Specific version type
733
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
734
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
735
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
736
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
737
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
738
-     * } $params
739
-     *
740
-     * @throws MissingParameterException if a required parameter is missing
741
-     * @throws NoNodeAvailableException if all the hosts are offline
742
-     * @throws ClientResponseException if the status code of response is 4xx
743
-     * @throws ServerResponseException if the status code of response is 5xx
744
-     *
745
-     * @return Elasticsearch|Promise
746
-     */
747
-    public function getSource(array $params = [])
748
-    {
749
-        $this->checkRequiredParameters(['id', 'index'], $params);
750
-        $url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
751
-        $method = 'GET';
752
-        $url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
753
-        $headers = ['Accept' => 'application/json'];
754
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
755
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'get_source');
756
-        return $this->sendRequest($request);
757
-    }
758
-    /**
759
-     * Returns the health of the cluster.
760
-     *
761
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html
762
-     *
763
-     * @param array{
764
-     *     feature: string, //  A feature of the cluster, as returned by the top-level health API
765
-     *     timeout: time, // Explicit operation timeout
766
-     *     verbose: boolean, // Opt in for more information about the health of the system
767
-     *     size: int, // Limit the number of affected resources the health API returns
768
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
769
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
770
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
771
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
772
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
773
-     * } $params
774
-     *
775
-     * @throws NoNodeAvailableException if all the hosts are offline
776
-     * @throws ClientResponseException if the status code of response is 4xx
777
-     * @throws ServerResponseException if the status code of response is 5xx
778
-     *
779
-     * @return Elasticsearch|Promise
780
-     */
781
-    public function healthReport(array $params = [])
782
-    {
783
-        if (isset($params['feature'])) {
784
-            $url = '/_health_report/' . $this->encode($params['feature']);
785
-            $method = 'GET';
786
-        } else {
787
-            $url = '/_health_report';
788
-            $method = 'GET';
789
-        }
790
-        $url = $this->addQueryString($url, $params, ['timeout', 'verbose', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
791
-        $headers = ['Accept' => 'application/json'];
792
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
793
-        $request = $this->addOtelAttributes($params, ['feature'], $request, 'health_report');
794
-        return $this->sendRequest($request);
795
-    }
796
-    /**
797
-     * Creates or updates a document in an index.
798
-     *
799
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
800
-     *
801
-     * @param array{
802
-     *     id: string, //  Document ID
803
-     *     index: string, // (REQUIRED) The name of the index
804
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
805
-     *     op_type: enum, // Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID
806
-     *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
807
-     *     routing: string, // Specific routing value
808
-     *     timeout: time, // Explicit operation timeout
809
-     *     version: number, // Explicit version number for concurrency control
810
-     *     version_type: enum, // Specific version type
811
-     *     if_seq_no: number, // only perform the index operation if the last operation that has changed the document has the specified sequence number
812
-     *     if_primary_term: number, // only perform the index operation if the last operation that has changed the document has the specified primary term
813
-     *     pipeline: string, // The pipeline id to preprocess incoming documents with
814
-     *     require_alias: boolean, // When true, requires destination to be an alias. Default is false
815
-     *     require_data_stream: boolean, // When true, requires the destination to be a data stream (existing or to-be-created). Default is false
816
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
817
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
818
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
819
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
820
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
821
-     *     body: array, // (REQUIRED) The document
822
-     * } $params
823
-     *
824
-     * @throws MissingParameterException if a required parameter is missing
825
-     * @throws NoNodeAvailableException if all the hosts are offline
826
-     * @throws ClientResponseException if the status code of response is 4xx
827
-     * @throws ServerResponseException if the status code of response is 5xx
828
-     *
829
-     * @return Elasticsearch|Promise
830
-     */
831
-    public function index(array $params = [])
832
-    {
833
-        $this->checkRequiredParameters(['index', 'body'], $params);
834
-        if (isset($params['id'])) {
835
-            $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
836
-            $method = 'PUT';
837
-        } else {
838
-            $url = '/' . $this->encode($params['index']) . '/_doc';
839
-            $method = 'POST';
840
-        }
841
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'op_type', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'if_seq_no', 'if_primary_term', 'pipeline', 'require_alias', 'require_data_stream', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
842
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
843
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
844
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'index');
845
-        return $this->sendRequest($request);
846
-    }
847
-    /**
848
-     * Returns basic information about the cluster.
849
-     *
850
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
851
-     *
852
-     * @param array{
853
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
854
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
855
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
856
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
857
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
858
-     * } $params
859
-     *
860
-     * @throws NoNodeAvailableException if all the hosts are offline
861
-     * @throws ClientResponseException if the status code of response is 4xx
862
-     * @throws ServerResponseException if the status code of response is 5xx
863
-     *
864
-     * @return Elasticsearch|Promise
865
-     */
866
-    public function info(array $params = [])
867
-    {
868
-        $url = '/';
869
-        $method = 'GET';
870
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
871
-        $headers = ['Accept' => 'application/json'];
872
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
873
-        $request = $this->addOtelAttributes($params, [], $request, 'info');
874
-        return $this->sendRequest($request);
875
-    }
876
-    /**
877
-     * Performs a kNN search.
878
-     *
879
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
880
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
881
-     *
882
-     * @param array{
883
-     *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` to perform the operation on all indices
884
-     *     routing: list, // A comma-separated list of specific routing values
885
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
886
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
887
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
888
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
889
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
890
-     *     body: array, //  The search definition
891
-     * } $params
892
-     *
893
-     * @throws MissingParameterException if a required parameter is missing
894
-     * @throws NoNodeAvailableException if all the hosts are offline
895
-     * @throws ClientResponseException if the status code of response is 4xx
896
-     * @throws ServerResponseException if the status code of response is 5xx
897
-     *
898
-     * @return Elasticsearch|Promise
899
-     */
900
-    public function knnSearch(array $params = [])
901
-    {
902
-        $this->checkRequiredParameters(['index'], $params);
903
-        $url = '/' . $this->encode($params['index']) . '/_knn_search';
904
-        $method = empty($params['body']) ? 'GET' : 'POST';
905
-        $url = $this->addQueryString($url, $params, ['routing', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
906
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
907
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
908
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'knn_search');
909
-        return $this->sendRequest($request);
910
-    }
911
-    /**
912
-     * Allows to get multiple documents in one request.
913
-     *
914
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
915
-     *
916
-     * @param array{
917
-     *     index: string, //  The name of the index
918
-     *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
919
-     *     stored_fields: list, // A comma-separated list of stored fields to return in the response
920
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
921
-     *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
922
-     *     refresh: boolean, // Refresh the shard containing the document before performing the operation
923
-     *     routing: string, // Specific routing value
924
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
925
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
926
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
927
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
928
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
929
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
930
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
931
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
932
-     *     body: array, // (REQUIRED) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
933
-     * } $params
934
-     *
935
-     * @throws NoNodeAvailableException if all the hosts are offline
936
-     * @throws ClientResponseException if the status code of response is 4xx
937
-     * @throws ServerResponseException if the status code of response is 5xx
938
-     *
939
-     * @return Elasticsearch|Promise
940
-     */
941
-    public function mget(array $params = [])
942
-    {
943
-        $this->checkRequiredParameters(['body'], $params);
944
-        if (isset($params['index'])) {
945
-            $url = '/' . $this->encode($params['index']) . '/_mget';
946
-            $method = empty($params['body']) ? 'GET' : 'POST';
947
-        } else {
948
-            $url = '/_mget';
949
-            $method = empty($params['body']) ? 'GET' : 'POST';
950
-        }
951
-        $url = $this->addQueryString($url, $params, ['force_synthetic_source', 'stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
952
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
953
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
954
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'mget');
955
-        return $this->sendRequest($request);
956
-    }
957
-    /**
958
-     * Allows to execute several search operations in one request.
959
-     *
960
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
961
-     *
962
-     * @param array{
963
-     *     index: list, //  A comma-separated list of index names to use as default
964
-     *     search_type: enum, // Search operation type
965
-     *     max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
966
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
967
-     *     pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
968
-     *     max_concurrent_shard_requests: number, // The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
969
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
970
-     *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
971
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
972
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
973
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
974
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
975
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
976
-     *     body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
977
-     * } $params
978
-     *
979
-     * @throws NoNodeAvailableException if all the hosts are offline
980
-     * @throws ClientResponseException if the status code of response is 4xx
981
-     * @throws ServerResponseException if the status code of response is 5xx
982
-     *
983
-     * @return Elasticsearch|Promise
984
-     */
985
-    public function msearch(array $params = [])
986
-    {
987
-        $this->checkRequiredParameters(['body'], $params);
988
-        if (isset($params['index'])) {
989
-            $url = '/' . $this->encode($params['index']) . '/_msearch';
990
-            $method = empty($params['body']) ? 'GET' : 'POST';
991
-        } else {
992
-            $url = '/_msearch';
993
-            $method = empty($params['body']) ? 'GET' : 'POST';
994
-        }
995
-        $url = $this->addQueryString($url, $params, ['search_type', 'max_concurrent_searches', 'typed_keys', 'pre_filter_shard_size', 'max_concurrent_shard_requests', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
996
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
997
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
998
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'msearch');
999
-        return $this->sendRequest($request);
1000
-    }
1001
-    /**
1002
-     * Allows to execute several search template operations in one request.
1003
-     *
1004
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
1005
-     *
1006
-     * @param array{
1007
-     *     index: list, //  A comma-separated list of index names to use as default
1008
-     *     search_type: enum, // Search operation type
1009
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1010
-     *     max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
1011
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1012
-     *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1013
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1014
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1015
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1016
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1017
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1018
-     *     body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
1019
-     * } $params
1020
-     *
1021
-     * @throws NoNodeAvailableException if all the hosts are offline
1022
-     * @throws ClientResponseException if the status code of response is 4xx
1023
-     * @throws ServerResponseException if the status code of response is 5xx
1024
-     *
1025
-     * @return Elasticsearch|Promise
1026
-     */
1027
-    public function msearchTemplate(array $params = [])
1028
-    {
1029
-        $this->checkRequiredParameters(['body'], $params);
1030
-        if (isset($params['index'])) {
1031
-            $url = '/' . $this->encode($params['index']) . '/_msearch/template';
1032
-            $method = empty($params['body']) ? 'GET' : 'POST';
1033
-        } else {
1034
-            $url = '/_msearch/template';
1035
-            $method = empty($params['body']) ? 'GET' : 'POST';
1036
-        }
1037
-        $url = $this->addQueryString($url, $params, ['search_type', 'typed_keys', 'max_concurrent_searches', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1038
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
1039
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1040
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'msearch_template');
1041
-        return $this->sendRequest($request);
1042
-    }
1043
-    /**
1044
-     * Returns multiple termvectors in one request.
1045
-     *
1046
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
1047
-     *
1048
-     * @param array{
1049
-     *     index: string, //  The index in which the document resides.
1050
-     *     ids: list, // A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
1051
-     *     term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1052
-     *     field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1053
-     *     fields: list, // A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1054
-     *     offsets: boolean, // Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1055
-     *     positions: boolean, // Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1056
-     *     payloads: boolean, // Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1057
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
1058
-     *     routing: string, // Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1059
-     *     realtime: boolean, // Specifies if requests are real-time as opposed to near-real-time (default: true).
1060
-     *     version: number, // Explicit version number for concurrency control
1061
-     *     version_type: enum, // Specific version type
1062
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1063
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1064
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1065
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1066
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1067
-     *     body: array, //  Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
1068
-     * } $params
1069
-     *
1070
-     * @throws NoNodeAvailableException if all the hosts are offline
1071
-     * @throws ClientResponseException if the status code of response is 4xx
1072
-     * @throws ServerResponseException if the status code of response is 5xx
1073
-     *
1074
-     * @return Elasticsearch|Promise
1075
-     */
1076
-    public function mtermvectors(array $params = [])
1077
-    {
1078
-        if (isset($params['index'])) {
1079
-            $url = '/' . $this->encode($params['index']) . '/_mtermvectors';
1080
-            $method = empty($params['body']) ? 'GET' : 'POST';
1081
-        } else {
1082
-            $url = '/_mtermvectors';
1083
-            $method = empty($params['body']) ? 'GET' : 'POST';
1084
-        }
1085
-        $url = $this->addQueryString($url, $params, ['ids', 'term_statistics', 'field_statistics', 'fields', 'offsets', 'positions', 'payloads', 'preference', 'routing', 'realtime', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1086
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1087
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1088
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'mtermvectors');
1089
-        return $this->sendRequest($request);
1090
-    }
1091
-    /**
1092
-     * Open a point in time that can be used in subsequent searches
1093
-     *
1094
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
1095
-     *
1096
-     * @param array{
1097
-     *     index: list, // (REQUIRED) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices
1098
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1099
-     *     routing: string, // Specific routing value
1100
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1101
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1102
-     *     keep_alive: string, // Specific the time to live for the point in time
1103
-     *     allow_partial_search_results: boolean, // Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false)
1104
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1105
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1106
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1107
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1108
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1109
-     *     body: array, //  An index_filter specified with the Query DSL
1110
-     * } $params
1111
-     *
1112
-     * @throws MissingParameterException if a required parameter is missing
1113
-     * @throws NoNodeAvailableException if all the hosts are offline
1114
-     * @throws ClientResponseException if the status code of response is 4xx
1115
-     * @throws ServerResponseException if the status code of response is 5xx
1116
-     *
1117
-     * @return Elasticsearch|Promise
1118
-     */
1119
-    public function openPointInTime(array $params = [])
1120
-    {
1121
-        $this->checkRequiredParameters(['index', 'keep_alive'], $params);
1122
-        $url = '/' . $this->encode($params['index']) . '/_pit';
1123
-        $method = 'POST';
1124
-        $url = $this->addQueryString($url, $params, ['preference', 'routing', 'ignore_unavailable', 'expand_wildcards', 'keep_alive', 'allow_partial_search_results', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1125
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1126
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1127
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'open_point_in_time');
1128
-        return $this->sendRequest($request);
1129
-    }
1130
-    /**
1131
-     * Returns whether the cluster is running.
1132
-     *
1133
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
1134
-     *
1135
-     * @param array{
1136
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1137
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1138
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1139
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1140
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1141
-     * } $params
1142
-     *
1143
-     * @throws NoNodeAvailableException if all the hosts are offline
1144
-     * @throws ClientResponseException if the status code of response is 4xx
1145
-     * @throws ServerResponseException if the status code of response is 5xx
1146
-     *
1147
-     * @return Elasticsearch|Promise
1148
-     */
1149
-    public function ping(array $params = [])
1150
-    {
1151
-        $url = '/';
1152
-        $method = 'HEAD';
1153
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1154
-        $headers = ['Accept' => 'application/json'];
1155
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1156
-        $request = $this->addOtelAttributes($params, [], $request, 'ping');
1157
-        return $this->sendRequest($request);
1158
-    }
1159
-    /**
1160
-     * Creates or updates a script.
1161
-     *
1162
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
1163
-     *
1164
-     * @param array{
1165
-     *     id: string, // (REQUIRED) Script ID
1166
-     *     context: string, //  Script context
1167
-     *     timeout: time, // Explicit operation timeout
1168
-     *     master_timeout: time, // Specify timeout for connection to master
1169
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1170
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1171
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1172
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1173
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1174
-     *     body: array, // (REQUIRED) The document
1175
-     * } $params
1176
-     *
1177
-     * @throws MissingParameterException if a required parameter is missing
1178
-     * @throws NoNodeAvailableException if all the hosts are offline
1179
-     * @throws ClientResponseException if the status code of response is 4xx
1180
-     * @throws ServerResponseException if the status code of response is 5xx
1181
-     *
1182
-     * @return Elasticsearch|Promise
1183
-     */
1184
-    public function putScript(array $params = [])
1185
-    {
1186
-        $this->checkRequiredParameters(['id', 'body'], $params);
1187
-        if (isset($params['context'])) {
1188
-            $url = '/_scripts/' . $this->encode($params['id']) . '/' . $this->encode($params['context']);
1189
-            $method = 'PUT';
1190
-        } else {
1191
-            $url = '/_scripts/' . $this->encode($params['id']);
1192
-            $method = 'PUT';
1193
-        }
1194
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1195
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1196
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1197
-        $request = $this->addOtelAttributes($params, ['id', 'context'], $request, 'put_script');
1198
-        return $this->sendRequest($request);
1199
-    }
1200
-    /**
1201
-     * Allows to evaluate the quality of ranked search results over a set of typical search queries
1202
-     *
1203
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
1204
-     *
1205
-     * @param array{
1206
-     *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1207
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1208
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1209
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1210
-     *     search_type: enum, // Search operation type
1211
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1212
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1213
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1214
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1215
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1216
-     *     body: array, // (REQUIRED) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
1217
-     * } $params
1218
-     *
1219
-     * @throws NoNodeAvailableException if all the hosts are offline
1220
-     * @throws ClientResponseException if the status code of response is 4xx
1221
-     * @throws ServerResponseException if the status code of response is 5xx
1222
-     *
1223
-     * @return Elasticsearch|Promise
1224
-     */
1225
-    public function rankEval(array $params = [])
1226
-    {
1227
-        $this->checkRequiredParameters(['body'], $params);
1228
-        if (isset($params['index'])) {
1229
-            $url = '/' . $this->encode($params['index']) . '/_rank_eval';
1230
-            $method = empty($params['body']) ? 'GET' : 'POST';
1231
-        } else {
1232
-            $url = '/_rank_eval';
1233
-            $method = empty($params['body']) ? 'GET' : 'POST';
1234
-        }
1235
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'search_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1236
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1237
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1238
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'rank_eval');
1239
-        return $this->sendRequest($request);
1240
-    }
1241
-    /**
1242
-     * Allows to copy documents from one index to another, optionally filtering the source
1243
-     * documents by a query, changing the destination index settings, or fetching the
1244
-     * documents from a remote cluster.
1245
-     *
1246
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
1247
-     *
1248
-     * @param array{
1249
-     *     refresh: boolean, // Should the affected indexes be refreshed?
1250
-     *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
1251
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1252
-     *     wait_for_completion: boolean, // Should the request should block until the reindex is complete.
1253
-     *     requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
1254
-     *     scroll: time, // Control how long to keep the search context alive
1255
-     *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
1256
-     *     max_docs: number, // Maximum number of documents to process (default: all documents)
1257
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1258
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1259
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1260
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1261
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1262
-     *     body: array, // (REQUIRED) The search definition using the Query DSL and the prototype for the index request.
1263
-     * } $params
1264
-     *
1265
-     * @throws NoNodeAvailableException if all the hosts are offline
1266
-     * @throws ClientResponseException if the status code of response is 4xx
1267
-     * @throws ServerResponseException if the status code of response is 5xx
1268
-     *
1269
-     * @return Elasticsearch|Promise
1270
-     */
1271
-    public function reindex(array $params = [])
1272
-    {
1273
-        $this->checkRequiredParameters(['body'], $params);
1274
-        $url = '/_reindex';
1275
-        $method = 'POST';
1276
-        $url = $this->addQueryString($url, $params, ['refresh', 'timeout', 'wait_for_active_shards', 'wait_for_completion', 'requests_per_second', 'scroll', 'slices', 'max_docs', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1277
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1278
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1279
-        $request = $this->addOtelAttributes($params, [], $request, 'reindex');
1280
-        return $this->sendRequest($request);
1281
-    }
1282
-    /**
1283
-     * Changes the number of requests per second for a particular Reindex operation.
1284
-     *
1285
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
1286
-     *
1287
-     * @param array{
1288
-     *     task_id: string, // (REQUIRED) The task id to rethrottle
1289
-     *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
1290
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1291
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1292
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1293
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1294
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1295
-     * } $params
1296
-     *
1297
-     * @throws MissingParameterException if a required parameter is missing
1298
-     * @throws NoNodeAvailableException if all the hosts are offline
1299
-     * @throws ClientResponseException if the status code of response is 4xx
1300
-     * @throws ServerResponseException if the status code of response is 5xx
1301
-     *
1302
-     * @return Elasticsearch|Promise
1303
-     */
1304
-    public function reindexRethrottle(array $params = [])
1305
-    {
1306
-        $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1307
-        $url = '/_reindex/' . $this->encode($params['task_id']) . '/_rethrottle';
1308
-        $method = 'POST';
1309
-        $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1310
-        $headers = ['Accept' => 'application/json'];
1311
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1312
-        $request = $this->addOtelAttributes($params, ['task_id'], $request, 'reindex_rethrottle');
1313
-        return $this->sendRequest($request);
1314
-    }
1315
-    /**
1316
-     * Allows to use the Mustache language to pre-render a search definition.
1317
-     *
1318
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html
1319
-     *
1320
-     * @param array{
1321
-     *     id: string, //  The id of the stored search template
1322
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1323
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1324
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1325
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1326
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1327
-     *     body: array, //  The search definition template and its params
1328
-     * } $params
1329
-     *
1330
-     * @throws NoNodeAvailableException if all the hosts are offline
1331
-     * @throws ClientResponseException if the status code of response is 4xx
1332
-     * @throws ServerResponseException if the status code of response is 5xx
1333
-     *
1334
-     * @return Elasticsearch|Promise
1335
-     */
1336
-    public function renderSearchTemplate(array $params = [])
1337
-    {
1338
-        if (isset($params['id'])) {
1339
-            $url = '/_render/template/' . $this->encode($params['id']);
1340
-            $method = empty($params['body']) ? 'GET' : 'POST';
1341
-        } else {
1342
-            $url = '/_render/template';
1343
-            $method = empty($params['body']) ? 'GET' : 'POST';
1344
-        }
1345
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1346
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1347
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1348
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'render_search_template');
1349
-        return $this->sendRequest($request);
1350
-    }
1351
-    /**
1352
-     * Allows an arbitrary script to be executed and a result to be returned
1353
-     *
1354
-     * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
1355
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1356
-     *
1357
-     * @param array{
1358
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1359
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1360
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1361
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1362
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1363
-     *     body: array, //  The script to execute
1364
-     * } $params
1365
-     *
1366
-     * @throws NoNodeAvailableException if all the hosts are offline
1367
-     * @throws ClientResponseException if the status code of response is 4xx
1368
-     * @throws ServerResponseException if the status code of response is 5xx
1369
-     *
1370
-     * @return Elasticsearch|Promise
1371
-     */
1372
-    public function scriptsPainlessExecute(array $params = [])
1373
-    {
1374
-        $url = '/_scripts/painless/_execute';
1375
-        $method = empty($params['body']) ? 'GET' : 'POST';
1376
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1377
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1378
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1379
-        $request = $this->addOtelAttributes($params, [], $request, 'scripts_painless_execute');
1380
-        return $this->sendRequest($request);
1381
-    }
1382
-    /**
1383
-     * Allows to retrieve a large numbers of results from a single search request.
1384
-     *
1385
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll
1386
-     *
1387
-     * @param array{
1388
-     *     scroll_id: string, //  The scroll ID
1389
-     *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1390
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1391
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1392
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1393
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1394
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1395
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1396
-     *     body: array, //  The scroll ID if not passed by URL or query parameter.
1397
-     * } $params
1398
-     *
1399
-     * @throws NoNodeAvailableException if all the hosts are offline
1400
-     * @throws ClientResponseException if the status code of response is 4xx
1401
-     * @throws ServerResponseException if the status code of response is 5xx
1402
-     *
1403
-     * @return Elasticsearch|Promise
1404
-     */
1405
-    public function scroll(array $params = [])
1406
-    {
1407
-        if (isset($params['scroll_id'])) {
1408
-            $url = '/_search/scroll/' . $this->encode($params['scroll_id']);
1409
-            $method = empty($params['body']) ? 'GET' : 'POST';
1410
-        } else {
1411
-            $url = '/_search/scroll';
1412
-            $method = empty($params['body']) ? 'GET' : 'POST';
1413
-        }
1414
-        $url = $this->addQueryString($url, $params, ['scroll', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1415
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1416
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1417
-        $request = $this->addOtelAttributes($params, ['scroll_id'], $request, 'scroll');
1418
-        return $this->sendRequest($request);
1419
-    }
1420
-    /**
1421
-     * Returns results matching a query.
1422
-     *
1423
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
1424
-     *
1425
-     * @param array{
1426
-     *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1427
-     *     analyzer: string, // The analyzer to use for the query string
1428
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
1429
-     *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1430
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
1431
-     *     df: string, // The field to use as default where no field prefix is given in the query string
1432
-     *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
1433
-     *     stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
1434
-     *     docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
1435
-     *     from: number, // Starting offset (default: 0)
1436
-     *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
1437
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1438
-     *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1439
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1440
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1441
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
1442
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1443
-     *     q: string, // Query in the Lucene query string syntax
1444
-     *     routing: list, // A comma-separated list of specific routing values
1445
-     *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1446
-     *     search_type: enum, // Search operation type
1447
-     *     size: number, // Number of hits to return (default: 10)
1448
-     *     sort: list, // A comma-separated list of <field>:<direction> pairs
1449
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
1450
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
1451
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
1452
-     *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
1453
-     *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
1454
-     *     suggest_field: string, // Specify which field to use for suggestions
1455
-     *     suggest_mode: enum, // Specify suggest mode
1456
-     *     suggest_size: number, // How many suggestions to return in response
1457
-     *     suggest_text: string, // The source text for which the suggestions should be returned
1458
-     *     timeout: time, // Explicit operation timeout
1459
-     *     track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
1460
-     *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
1461
-     *     allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
1462
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1463
-     *     version: boolean, // Specify whether to return document version as part of a hit
1464
-     *     seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
1465
-     *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
1466
-     *     batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
1467
-     *     max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
1468
-     *     pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
1469
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1470
-     *     min_compatible_shard_node: string, // The minimum compatible version that all shards involved in search should have for this request to be successful
1471
-     *     include_named_queries_score: boolean, // Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)
1472
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1473
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1474
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1475
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1476
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1477
-     *     body: array, //  The search definition using the Query DSL
1478
-     * } $params
1479
-     *
1480
-     * @throws NoNodeAvailableException if all the hosts are offline
1481
-     * @throws ClientResponseException if the status code of response is 4xx
1482
-     * @throws ServerResponseException if the status code of response is 5xx
1483
-     *
1484
-     * @return Elasticsearch|Promise
1485
-     */
1486
-    public function search(array $params = [])
1487
-    {
1488
-        if (isset($params['index'])) {
1489
-            $url = '/' . $this->encode($params['index']) . '/_search';
1490
-            $method = empty($params['body']) ? 'GET' : 'POST';
1491
-        } else {
1492
-            $url = '/_search';
1493
-            $method = empty($params['body']) ? 'GET' : 'POST';
1494
-        }
1495
-        $url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'force_synthetic_source', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'min_compatible_shard_node', 'include_named_queries_score', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1496
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1497
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1498
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'search');
1499
-        return $this->sendRequest($request);
1500
-    }
1501
-    /**
1502
-     * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.
1503
-     *
1504
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html
1505
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1506
-     *
1507
-     * @param array{
1508
-     *     index: list, // (REQUIRED) Comma-separated list of data streams, indices, or aliases to search
1509
-     *     field: string, // (REQUIRED) Field containing geospatial data to return
1510
-     *     zoom: int, // (REQUIRED) Zoom level for the vector tile to search
1511
-     *     x: int, // (REQUIRED) X coordinate for the vector tile to search
1512
-     *     y: int, // (REQUIRED) Y coordinate for the vector tile to search
1513
-     *     exact_bounds: boolean, // If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation.
1514
-     *     extent: int, // Size, in pixels, of a side of the vector tile.
1515
-     *     grid_precision: int, // Additional zoom levels available through the aggs layer. Accepts 0-8.
1516
-     *     grid_type: enum, // Determines the geometry type for features in the aggs layer.
1517
-     *     size: int, // Maximum number of features to return in the hits layer. Accepts 0-10000.
1518
-     *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
1519
-     *     with_labels: boolean, // If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features.
1520
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1521
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1522
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1523
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1524
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1525
-     *     body: array, //  Search request body.
1526
-     * } $params
1527
-     *
1528
-     * @throws MissingParameterException if a required parameter is missing
1529
-     * @throws NoNodeAvailableException if all the hosts are offline
1530
-     * @throws ClientResponseException if the status code of response is 4xx
1531
-     * @throws ServerResponseException if the status code of response is 5xx
1532
-     *
1533
-     * @return Elasticsearch|Promise
1534
-     */
1535
-    public function searchMvt(array $params = [])
1536
-    {
1537
-        $this->checkRequiredParameters(['index', 'field', 'zoom', 'x', 'y'], $params);
1538
-        $url = '/' . $this->encode($params['index']) . '/_mvt/' . $this->encode($params['field']) . '/' . $this->encode($params['zoom']) . '/' . $this->encode($params['x']) . '/' . $this->encode($params['y']);
1539
-        $method = empty($params['body']) ? 'GET' : 'POST';
1540
-        $url = $this->addQueryString($url, $params, ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'with_labels', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1541
-        $headers = ['Accept' => 'application/vnd.mapbox-vector-tile', 'Content-Type' => 'application/json'];
1542
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1543
-        $request = $this->addOtelAttributes($params, ['index', 'field', 'zoom', 'x', 'y'], $request, 'search_mvt');
1544
-        return $this->sendRequest($request);
1545
-    }
1546
-    /**
1547
-     * Returns information about the indices and shards that a search request would be executed against.
1548
-     *
1549
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
1550
-     *
1551
-     * @param array{
1552
-     *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1553
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1554
-     *     routing: string, // Specific routing value
1555
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1556
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1557
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1558
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1559
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
1560
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1561
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1562
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1563
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1564
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1565
-     * } $params
1566
-     *
1567
-     * @throws NoNodeAvailableException if all the hosts are offline
1568
-     * @throws ClientResponseException if the status code of response is 4xx
1569
-     * @throws ServerResponseException if the status code of response is 5xx
1570
-     *
1571
-     * @return Elasticsearch|Promise
1572
-     */
1573
-    public function searchShards(array $params = [])
1574
-    {
1575
-        if (isset($params['index'])) {
1576
-            $url = '/' . $this->encode($params['index']) . '/_search_shards';
1577
-            $method = empty($params['body']) ? 'GET' : 'POST';
1578
-        } else {
1579
-            $url = '/_search_shards';
1580
-            $method = empty($params['body']) ? 'GET' : 'POST';
1581
-        }
1582
-        $url = $this->addQueryString($url, $params, ['preference', 'routing', 'local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1583
-        $headers = ['Accept' => 'application/json'];
1584
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1585
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'search_shards');
1586
-        return $this->sendRequest($request);
1587
-    }
1588
-    /**
1589
-     * Allows to use the Mustache language to pre-render a search definition.
1590
-     *
1591
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
1592
-     *
1593
-     * @param array{
1594
-     *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1595
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1596
-     *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1597
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1598
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1599
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1600
-     *     routing: list, // A comma-separated list of specific routing values
1601
-     *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1602
-     *     search_type: enum, // Search operation type
1603
-     *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
1604
-     *     profile: boolean, // Specify whether to profile the query execution
1605
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1606
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1607
-     *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1608
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1609
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1610
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1611
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1612
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1613
-     *     body: array, // (REQUIRED) The search definition template and its params
1614
-     * } $params
1615
-     *
1616
-     * @throws NoNodeAvailableException if all the hosts are offline
1617
-     * @throws ClientResponseException if the status code of response is 4xx
1618
-     * @throws ServerResponseException if the status code of response is 5xx
1619
-     *
1620
-     * @return Elasticsearch|Promise
1621
-     */
1622
-    public function searchTemplate(array $params = [])
1623
-    {
1624
-        $this->checkRequiredParameters(['body'], $params);
1625
-        if (isset($params['index'])) {
1626
-            $url = '/' . $this->encode($params['index']) . '/_search/template';
1627
-            $method = empty($params['body']) ? 'GET' : 'POST';
1628
-        } else {
1629
-            $url = '/_search/template';
1630
-            $method = empty($params['body']) ? 'GET' : 'POST';
1631
-        }
1632
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'preference', 'routing', 'scroll', 'search_type', 'explain', 'profile', 'typed_keys', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1633
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1634
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1635
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'search_template');
1636
-        return $this->sendRequest($request);
1637
-    }
1638
-    /**
1639
-     * The terms enum API  can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
1640
-     *
1641
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html
1642
-     *
1643
-     * @param array{
1644
-     *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1645
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1646
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1647
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1648
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1649
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1650
-     *     body: array, //  field name, string which is the prefix expected in matching terms, timeout and size for max number of results
1651
-     * } $params
1652
-     *
1653
-     * @throws MissingParameterException if a required parameter is missing
1654
-     * @throws NoNodeAvailableException if all the hosts are offline
1655
-     * @throws ClientResponseException if the status code of response is 4xx
1656
-     * @throws ServerResponseException if the status code of response is 5xx
1657
-     *
1658
-     * @return Elasticsearch|Promise
1659
-     */
1660
-    public function termsEnum(array $params = [])
1661
-    {
1662
-        $this->checkRequiredParameters(['index'], $params);
1663
-        $url = '/' . $this->encode($params['index']) . '/_terms_enum';
1664
-        $method = empty($params['body']) ? 'GET' : 'POST';
1665
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1666
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1667
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1668
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'terms_enum');
1669
-        return $this->sendRequest($request);
1670
-    }
1671
-    /**
1672
-     * Returns information and statistics about terms in the fields of a particular document.
1673
-     *
1674
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
1675
-     *
1676
-     * @param array{
1677
-     *     index: string, // (REQUIRED) The index in which the document resides.
1678
-     *     id: string, //  The id of the document, when not specified a doc param should be supplied.
1679
-     *     term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned.
1680
-     *     field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
1681
-     *     fields: list, // A comma-separated list of fields to return.
1682
-     *     offsets: boolean, // Specifies if term offsets should be returned.
1683
-     *     positions: boolean, // Specifies if term positions should be returned.
1684
-     *     payloads: boolean, // Specifies if term payloads should be returned.
1685
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random).
1686
-     *     routing: string, // Specific routing value.
1687
-     *     realtime: boolean, // Specifies if request is real-time as opposed to near-real-time (default: true).
1688
-     *     version: number, // Explicit version number for concurrency control
1689
-     *     version_type: enum, // Specific version type
1690
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1691
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1692
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1693
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1694
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1695
-     *     body: array, //  Define parameters and or supply a document to get termvectors for. See documentation.
1696
-     * } $params
1697
-     *
1698
-     * @throws MissingParameterException if a required parameter is missing
1699
-     * @throws NoNodeAvailableException if all the hosts are offline
1700
-     * @throws ClientResponseException if the status code of response is 4xx
1701
-     * @throws ServerResponseException if the status code of response is 5xx
1702
-     *
1703
-     * @return Elasticsearch|Promise
1704
-     */
1705
-    public function termvectors(array $params = [])
1706
-    {
1707
-        $this->checkRequiredParameters(['index'], $params);
1708
-        if (isset($params['id'])) {
1709
-            $url = '/' . $this->encode($params['index']) . '/_termvectors/' . $this->encode($params['id']);
1710
-            $method = empty($params['body']) ? 'GET' : 'POST';
1711
-        } else {
1712
-            $url = '/' . $this->encode($params['index']) . '/_termvectors';
1713
-            $method = empty($params['body']) ? 'GET' : 'POST';
1714
-        }
1715
-        $url = $this->addQueryString($url, $params, ['term_statistics', 'field_statistics', 'fields', 'offsets', 'positions', 'payloads', 'preference', 'routing', 'realtime', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1716
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1717
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1718
-        $request = $this->addOtelAttributes($params, ['index', 'id'], $request, 'termvectors');
1719
-        return $this->sendRequest($request);
1720
-    }
1721
-    /**
1722
-     * Updates a document with a script or partial document.
1723
-     *
1724
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
1725
-     *
1726
-     * @param array{
1727
-     *     id: string, // (REQUIRED) Document ID
1728
-     *     index: string, // (REQUIRED) The name of the index
1729
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1730
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
1731
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
1732
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
1733
-     *     lang: string, // The script language (default: painless)
1734
-     *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
1735
-     *     retry_on_conflict: number, // Specify how many times should the operation be retried when a conflict occurs (default: 0)
1736
-     *     routing: string, // Specific routing value
1737
-     *     timeout: time, // Explicit operation timeout
1738
-     *     if_seq_no: number, // only perform the update operation if the last operation that has changed the document has the specified sequence number
1739
-     *     if_primary_term: number, // only perform the update operation if the last operation that has changed the document has the specified primary term
1740
-     *     require_alias: boolean, // When true, requires destination is an alias. Default is false
1741
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1742
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1743
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1744
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1745
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1746
-     *     body: array, // (REQUIRED) The request definition requires either `script` or partial `doc`
1747
-     * } $params
1748
-     *
1749
-     * @throws MissingParameterException if a required parameter is missing
1750
-     * @throws NoNodeAvailableException if all the hosts are offline
1751
-     * @throws ClientResponseException if the status code of response is 4xx
1752
-     * @throws ServerResponseException if the status code of response is 5xx
1753
-     *
1754
-     * @return Elasticsearch|Promise
1755
-     */
1756
-    public function update(array $params = [])
1757
-    {
1758
-        $this->checkRequiredParameters(['id', 'index', 'body'], $params);
1759
-        $url = '/' . $this->encode($params['index']) . '/_update/' . $this->encode($params['id']);
1760
-        $method = 'POST';
1761
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1762
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1763
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1764
-        $request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'update');
1765
-        return $this->sendRequest($request);
1766
-    }
1767
-    /**
1768
-     * Performs an update on every document in the index without changing the source,
1769
-     * for example to pick up a mapping change.
1770
-     *
1771
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
1772
-     *
1773
-     * @param array{
1774
-     *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1775
-     *     analyzer: string, // The analyzer to use for the query string
1776
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
1777
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
1778
-     *     df: string, // The field to use as default where no field prefix is given in the query string
1779
-     *     from: number, // Starting offset (default: 0)
1780
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1781
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1782
-     *     conflicts: enum, // What to do when the update by query hits version conflicts?
1783
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1784
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
1785
-     *     pipeline: string, // Ingest pipeline to set on index requests made by this action. (default: none)
1786
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1787
-     *     q: string, // Query in the Lucene query string syntax
1788
-     *     routing: list, // A comma-separated list of specific routing values
1789
-     *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1790
-     *     search_type: enum, // Search operation type
1791
-     *     search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
1792
-     *     max_docs: number, // Maximum number of documents to process (default: all documents)
1793
-     *     sort: list, // A comma-separated list of <field>:<direction> pairs
1794
-     *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
1795
-     *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
1796
-     *     version: boolean, // Specify whether to return document version as part of a hit
1797
-     *     version_type: boolean, // Should the document increment the version number (internal) on hit or not (reindex)
1798
-     *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
1799
-     *     refresh: boolean, // Should the affected indexes be refreshed?
1800
-     *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
1801
-     *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1802
-     *     scroll_size: number, // Size on the scroll request powering the update by query
1803
-     *     wait_for_completion: boolean, // Should the request should block until the update by query operation is complete.
1804
-     *     requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
1805
-     *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
1806
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1807
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1808
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1809
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1810
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1811
-     *     body: array, //  The search definition using the Query DSL
1812
-     * } $params
1813
-     *
1814
-     * @throws MissingParameterException if a required parameter is missing
1815
-     * @throws NoNodeAvailableException if all the hosts are offline
1816
-     * @throws ClientResponseException if the status code of response is 4xx
1817
-     * @throws ServerResponseException if the status code of response is 5xx
1818
-     *
1819
-     * @return Elasticsearch|Promise
1820
-     */
1821
-    public function updateByQuery(array $params = [])
1822
-    {
1823
-        $this->checkRequiredParameters(['index'], $params);
1824
-        $url = '/' . $this->encode($params['index']) . '/_update_by_query';
1825
-        $method = 'POST';
1826
-        $url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1827
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1828
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1829
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'update_by_query');
1830
-        return $this->sendRequest($request);
1831
-    }
1832
-    /**
1833
-     * Changes the number of requests per second for a particular Update By Query operation.
1834
-     *
1835
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
1836
-     *
1837
-     * @param array{
1838
-     *     task_id: string, // (REQUIRED) The task id to rethrottle
1839
-     *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
1840
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1841
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1842
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1843
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1844
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1845
-     * } $params
1846
-     *
1847
-     * @throws MissingParameterException if a required parameter is missing
1848
-     * @throws NoNodeAvailableException if all the hosts are offline
1849
-     * @throws ClientResponseException if the status code of response is 4xx
1850
-     * @throws ServerResponseException if the status code of response is 5xx
1851
-     *
1852
-     * @return Elasticsearch|Promise
1853
-     */
1854
-    public function updateByQueryRethrottle(array $params = [])
1855
-    {
1856
-        $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1857
-        $url = '/_update_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
1858
-        $method = 'POST';
1859
-        $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1860
-        $headers = ['Accept' => 'application/json'];
1861
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1862
-        $request = $this->addOtelAttributes($params, ['task_id'], $request, 'update_by_query_rethrottle');
1863
-        return $this->sendRequest($request);
1864
-    }
28
+	/**
29
+	 * Allows to perform multiple index/update/delete operations in a single request.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
32
+	 *
33
+	 * @param array{
34
+	 *     index: string, //  Default index for items which don't provide one
35
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
36
+	 *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
37
+	 *     routing: string, // Specific routing value
38
+	 *     timeout: time, // Explicit operation timeout
39
+	 *     type: string, // Default document type for items which don't provide one
40
+	 *     _source: list, // True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
41
+	 *     _source_excludes: list, // Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
42
+	 *     _source_includes: list, // Default list of fields to extract and return from the _source field, can be overridden on each sub-request
43
+	 *     pipeline: string, // The pipeline id to preprocess incoming documents with
44
+	 *     require_alias: boolean, // Sets require_alias for all incoming documents. Defaults to unset (false)
45
+	 *     require_data_stream: boolean, // When true, requires the destination to be a data stream (existing or to-be-created). Default is false
46
+	 *     list_executed_pipelines: boolean, // Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)
47
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
48
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
49
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
50
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
51
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
52
+	 *     body: array, // (REQUIRED) The operation definition and data (action-data pairs), separated by newlines
53
+	 * } $params
54
+	 *
55
+	 * @throws NoNodeAvailableException if all the hosts are offline
56
+	 * @throws ClientResponseException if the status code of response is 4xx
57
+	 * @throws ServerResponseException if the status code of response is 5xx
58
+	 *
59
+	 * @return Elasticsearch|Promise
60
+	 */
61
+	public function bulk(array $params = [])
62
+	{
63
+		$this->checkRequiredParameters(['body'], $params);
64
+		if (isset($params['index'])) {
65
+			$url = '/' . $this->encode($params['index']) . '/_bulk';
66
+			$method = 'POST';
67
+		} else {
68
+			$url = '/_bulk';
69
+			$method = 'POST';
70
+		}
71
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_includes', 'pipeline', 'require_alias', 'require_data_stream', 'list_executed_pipelines', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
72
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
73
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
74
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'bulk');
75
+		return $this->sendRequest($request);
76
+	}
77
+	/**
78
+	 * Explicitly clears the search context for a scroll.
79
+	 *
80
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html
81
+	 *
82
+	 * @param array{
83
+	 *     scroll_id: list, //  A comma-separated list of scroll IDs to clear
84
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
85
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
86
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
87
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
88
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
89
+	 *     body: array, //  A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
90
+	 * } $params
91
+	 *
92
+	 * @throws NoNodeAvailableException if all the hosts are offline
93
+	 * @throws ClientResponseException if the status code of response is 4xx
94
+	 * @throws ServerResponseException if the status code of response is 5xx
95
+	 *
96
+	 * @return Elasticsearch|Promise
97
+	 */
98
+	public function clearScroll(array $params = [])
99
+	{
100
+		if (isset($params['scroll_id'])) {
101
+			$url = '/_search/scroll/' . $this->encode($params['scroll_id']);
102
+			$method = 'DELETE';
103
+		} else {
104
+			$url = '/_search/scroll';
105
+			$method = 'DELETE';
106
+		}
107
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
108
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
109
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
110
+		$request = $this->addOtelAttributes($params, ['scroll_id'], $request, 'clear_scroll');
111
+		return $this->sendRequest($request);
112
+	}
113
+	/**
114
+	 * Close a point in time
115
+	 *
116
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
117
+	 *
118
+	 * @param array{
119
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
120
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
121
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
122
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
123
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
124
+	 *     body: array, //  a point-in-time id to close
125
+	 * } $params
126
+	 *
127
+	 * @throws NoNodeAvailableException if all the hosts are offline
128
+	 * @throws ClientResponseException if the status code of response is 4xx
129
+	 * @throws ServerResponseException if the status code of response is 5xx
130
+	 *
131
+	 * @return Elasticsearch|Promise
132
+	 */
133
+	public function closePointInTime(array $params = [])
134
+	{
135
+		$url = '/_pit';
136
+		$method = 'DELETE';
137
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
138
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
139
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
140
+		$request = $this->addOtelAttributes($params, [], $request, 'close_point_in_time');
141
+		return $this->sendRequest($request);
142
+	}
143
+	/**
144
+	 * Returns number of documents matching a query.
145
+	 *
146
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
147
+	 *
148
+	 * @param array{
149
+	 *     index: list, //  A comma-separated list of indices to restrict the results
150
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
151
+	 *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
152
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
153
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
154
+	 *     min_score: number, // Include only documents with a specific `_score` value in the result
155
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
156
+	 *     routing: list, // A comma-separated list of specific routing values
157
+	 *     q: string, // Query in the Lucene query string syntax
158
+	 *     analyzer: string, // The analyzer to use for the query string
159
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
160
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
161
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
162
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
163
+	 *     terminate_after: number, // The maximum count for each shard, upon reaching which the query execution will terminate early
164
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
165
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
166
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
167
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
168
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
169
+	 *     body: array, //  A query to restrict the results specified with the Query DSL (optional)
170
+	 * } $params
171
+	 *
172
+	 * @throws NoNodeAvailableException if all the hosts are offline
173
+	 * @throws ClientResponseException if the status code of response is 4xx
174
+	 * @throws ServerResponseException if the status code of response is 5xx
175
+	 *
176
+	 * @return Elasticsearch|Promise
177
+	 */
178
+	public function count(array $params = [])
179
+	{
180
+		if (isset($params['index'])) {
181
+			$url = '/' . $this->encode($params['index']) . '/_count';
182
+			$method = empty($params['body']) ? 'GET' : 'POST';
183
+		} else {
184
+			$url = '/_count';
185
+			$method = empty($params['body']) ? 'GET' : 'POST';
186
+		}
187
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'min_score', 'preference', 'routing', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'terminate_after', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
188
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
189
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
190
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'count');
191
+		return $this->sendRequest($request);
192
+	}
193
+	/**
194
+	 * Creates a new document in the index.
195
+	 *
196
+	 * Returns a 409 response when a document with a same ID already exists in the index.
197
+	 *
198
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
199
+	 *
200
+	 * @param array{
201
+	 *     id: string, // (REQUIRED) Document ID
202
+	 *     index: string, // (REQUIRED) The name of the index
203
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
204
+	 *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
205
+	 *     routing: string, // Specific routing value
206
+	 *     timeout: time, // Explicit operation timeout
207
+	 *     version: number, // Explicit version number for concurrency control
208
+	 *     version_type: enum, // Specific version type
209
+	 *     pipeline: string, // The pipeline id to preprocess incoming documents with
210
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
211
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
212
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
213
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
214
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
215
+	 *     body: array, // (REQUIRED) The document
216
+	 * } $params
217
+	 *
218
+	 * @throws MissingParameterException if a required parameter is missing
219
+	 * @throws NoNodeAvailableException if all the hosts are offline
220
+	 * @throws ClientResponseException if the status code of response is 4xx
221
+	 * @throws ServerResponseException if the status code of response is 5xx
222
+	 *
223
+	 * @return Elasticsearch|Promise
224
+	 */
225
+	public function create(array $params = [])
226
+	{
227
+		$this->checkRequiredParameters(['id', 'index', 'body'], $params);
228
+		$url = '/' . $this->encode($params['index']) . '/_create/' . $this->encode($params['id']);
229
+		$method = 'PUT';
230
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
231
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
232
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
233
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'create');
234
+		return $this->sendRequest($request);
235
+	}
236
+	/**
237
+	 * Removes a document from the index.
238
+	 *
239
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
240
+	 *
241
+	 * @param array{
242
+	 *     id: string, // (REQUIRED) The document ID
243
+	 *     index: string, // (REQUIRED) The name of the index
244
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
245
+	 *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
246
+	 *     routing: string, // Specific routing value
247
+	 *     timeout: time, // Explicit operation timeout
248
+	 *     if_seq_no: number, // only perform the delete operation if the last operation that has changed the document has the specified sequence number
249
+	 *     if_primary_term: number, // only perform the delete operation if the last operation that has changed the document has the specified primary term
250
+	 *     version: number, // Explicit version number for concurrency control
251
+	 *     version_type: enum, // Specific version type
252
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
253
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
254
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
255
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
256
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
257
+	 * } $params
258
+	 *
259
+	 * @throws MissingParameterException if a required parameter is missing
260
+	 * @throws NoNodeAvailableException if all the hosts are offline
261
+	 * @throws ClientResponseException if the status code of response is 4xx
262
+	 * @throws ServerResponseException if the status code of response is 5xx
263
+	 *
264
+	 * @return Elasticsearch|Promise
265
+	 */
266
+	public function delete(array $params = [])
267
+	{
268
+		$this->checkRequiredParameters(['id', 'index'], $params);
269
+		$url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
270
+		$method = 'DELETE';
271
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
272
+		$headers = ['Accept' => 'application/json'];
273
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
274
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'delete');
275
+		return $this->sendRequest($request);
276
+	}
277
+	/**
278
+	 * Deletes documents matching the provided query.
279
+	 *
280
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
281
+	 *
282
+	 * @param array{
283
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
284
+	 *     analyzer: string, // The analyzer to use for the query string
285
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
286
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
287
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
288
+	 *     from: number, // Starting offset (default: 0)
289
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
290
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
291
+	 *     conflicts: enum, // What to do when the delete by query hits version conflicts?
292
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
293
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
294
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
295
+	 *     q: string, // Query in the Lucene query string syntax
296
+	 *     routing: list, // A comma-separated list of specific routing values
297
+	 *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
298
+	 *     search_type: enum, // Search operation type
299
+	 *     search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
300
+	 *     max_docs: number, // Maximum number of documents to process (default: all documents)
301
+	 *     sort: list, // A comma-separated list of <field>:<direction> pairs
302
+	 *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
303
+	 *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
304
+	 *     version: boolean, // Specify whether to return document version as part of a hit
305
+	 *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
306
+	 *     refresh: boolean, // Should the affected indexes be refreshed?
307
+	 *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
308
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
309
+	 *     scroll_size: number, // Size on the scroll request powering the delete by query
310
+	 *     wait_for_completion: boolean, // Should the request should block until the delete by query is complete.
311
+	 *     requests_per_second: number, // The throttle for this request in sub-requests per second. -1 means no throttle.
312
+	 *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
313
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
314
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
315
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
316
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
317
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
318
+	 *     body: array, // (REQUIRED) The search definition using the Query DSL
319
+	 * } $params
320
+	 *
321
+	 * @throws MissingParameterException if a required parameter is missing
322
+	 * @throws NoNodeAvailableException if all the hosts are offline
323
+	 * @throws ClientResponseException if the status code of response is 4xx
324
+	 * @throws ServerResponseException if the status code of response is 5xx
325
+	 *
326
+	 * @return Elasticsearch|Promise
327
+	 */
328
+	public function deleteByQuery(array $params = [])
329
+	{
330
+		$this->checkRequiredParameters(['index', 'body'], $params);
331
+		$url = '/' . $this->encode($params['index']) . '/_delete_by_query';
332
+		$method = 'POST';
333
+		$url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
334
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
335
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
336
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'delete_by_query');
337
+		return $this->sendRequest($request);
338
+	}
339
+	/**
340
+	 * Changes the number of requests per second for a particular Delete By Query operation.
341
+	 *
342
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
343
+	 *
344
+	 * @param array{
345
+	 *     task_id: string, // (REQUIRED) The task id to rethrottle
346
+	 *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
347
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
348
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
349
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
350
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
351
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
352
+	 * } $params
353
+	 *
354
+	 * @throws MissingParameterException if a required parameter is missing
355
+	 * @throws NoNodeAvailableException if all the hosts are offline
356
+	 * @throws ClientResponseException if the status code of response is 4xx
357
+	 * @throws ServerResponseException if the status code of response is 5xx
358
+	 *
359
+	 * @return Elasticsearch|Promise
360
+	 */
361
+	public function deleteByQueryRethrottle(array $params = [])
362
+	{
363
+		$this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
364
+		$url = '/_delete_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
365
+		$method = 'POST';
366
+		$url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
367
+		$headers = ['Accept' => 'application/json'];
368
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
369
+		$request = $this->addOtelAttributes($params, ['task_id'], $request, 'delete_by_query_rethrottle');
370
+		return $this->sendRequest($request);
371
+	}
372
+	/**
373
+	 * Deletes a script.
374
+	 *
375
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
376
+	 *
377
+	 * @param array{
378
+	 *     id: string, // (REQUIRED) Script ID
379
+	 *     timeout: time, // Explicit operation timeout
380
+	 *     master_timeout: time, // Specify timeout for connection to master
381
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
382
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
383
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
384
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
385
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
386
+	 * } $params
387
+	 *
388
+	 * @throws MissingParameterException if a required parameter is missing
389
+	 * @throws NoNodeAvailableException if all the hosts are offline
390
+	 * @throws ClientResponseException if the status code of response is 4xx
391
+	 * @throws ServerResponseException if the status code of response is 5xx
392
+	 *
393
+	 * @return Elasticsearch|Promise
394
+	 */
395
+	public function deleteScript(array $params = [])
396
+	{
397
+		$this->checkRequiredParameters(['id'], $params);
398
+		$url = '/_scripts/' . $this->encode($params['id']);
399
+		$method = 'DELETE';
400
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
401
+		$headers = ['Accept' => 'application/json'];
402
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
403
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'delete_script');
404
+		return $this->sendRequest($request);
405
+	}
406
+	/**
407
+	 * Returns information about whether a document exists in an index.
408
+	 *
409
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
410
+	 *
411
+	 * @param array{
412
+	 *     id: string, // (REQUIRED) The document ID
413
+	 *     index: string, // (REQUIRED) The name of the index
414
+	 *     stored_fields: list, // A comma-separated list of stored fields to return in the response
415
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
416
+	 *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
417
+	 *     refresh: boolean, // Refresh the shard containing the document before performing the operation
418
+	 *     routing: string, // Specific routing value
419
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
420
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
421
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
422
+	 *     version: number, // Explicit version number for concurrency control
423
+	 *     version_type: enum, // Specific version type
424
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
425
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
426
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
427
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
428
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
429
+	 * } $params
430
+	 *
431
+	 * @throws MissingParameterException if a required parameter is missing
432
+	 * @throws NoNodeAvailableException if all the hosts are offline
433
+	 * @throws ClientResponseException if the status code of response is 4xx
434
+	 * @throws ServerResponseException if the status code of response is 5xx
435
+	 *
436
+	 * @return Elasticsearch|Promise
437
+	 */
438
+	public function exists(array $params = [])
439
+	{
440
+		$this->checkRequiredParameters(['id', 'index'], $params);
441
+		$url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
442
+		$method = 'HEAD';
443
+		$url = $this->addQueryString($url, $params, ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
444
+		$headers = ['Accept' => 'application/json'];
445
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
446
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'exists');
447
+		return $this->sendRequest($request);
448
+	}
449
+	/**
450
+	 * Returns information about whether a document source exists in an index.
451
+	 *
452
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
453
+	 *
454
+	 * @param array{
455
+	 *     id: string, // (REQUIRED) The document ID
456
+	 *     index: string, // (REQUIRED) The name of the index
457
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
458
+	 *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
459
+	 *     refresh: boolean, // Refresh the shard containing the document before performing the operation
460
+	 *     routing: string, // Specific routing value
461
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
462
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
463
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
464
+	 *     version: number, // Explicit version number for concurrency control
465
+	 *     version_type: enum, // Specific version type
466
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
467
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
468
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
469
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
470
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
471
+	 * } $params
472
+	 *
473
+	 * @throws MissingParameterException if a required parameter is missing
474
+	 * @throws NoNodeAvailableException if all the hosts are offline
475
+	 * @throws ClientResponseException if the status code of response is 4xx
476
+	 * @throws ServerResponseException if the status code of response is 5xx
477
+	 *
478
+	 * @return Elasticsearch|Promise
479
+	 */
480
+	public function existsSource(array $params = [])
481
+	{
482
+		$this->checkRequiredParameters(['id', 'index'], $params);
483
+		$url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
484
+		$method = 'HEAD';
485
+		$url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
486
+		$headers = ['Accept' => 'application/json'];
487
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
488
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'exists_source');
489
+		return $this->sendRequest($request);
490
+	}
491
+	/**
492
+	 * Returns information about why a specific matches (or doesn't match) a query.
493
+	 *
494
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
495
+	 *
496
+	 * @param array{
497
+	 *     id: string, // (REQUIRED) The document ID
498
+	 *     index: string, // (REQUIRED) The name of the index
499
+	 *     analyze_wildcard: boolean, // Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
500
+	 *     analyzer: string, // The analyzer for the query string query
501
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
502
+	 *     df: string, // The default field for query string query (default: _all)
503
+	 *     stored_fields: list, // A comma-separated list of stored fields to return in the response
504
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
505
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
506
+	 *     q: string, // Query in the Lucene query string syntax
507
+	 *     routing: string, // Specific routing value
508
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
509
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
510
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
511
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
512
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
513
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
514
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
515
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
516
+	 *     body: array, //  The query definition using the Query DSL
517
+	 * } $params
518
+	 *
519
+	 * @throws MissingParameterException if a required parameter is missing
520
+	 * @throws NoNodeAvailableException if all the hosts are offline
521
+	 * @throws ClientResponseException if the status code of response is 4xx
522
+	 * @throws ServerResponseException if the status code of response is 5xx
523
+	 *
524
+	 * @return Elasticsearch|Promise
525
+	 */
526
+	public function explain(array $params = [])
527
+	{
528
+		$this->checkRequiredParameters(['id', 'index'], $params);
529
+		$url = '/' . $this->encode($params['index']) . '/_explain/' . $this->encode($params['id']);
530
+		$method = empty($params['body']) ? 'GET' : 'POST';
531
+		$url = $this->addQueryString($url, $params, ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
532
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
533
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
534
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'explain');
535
+		return $this->sendRequest($request);
536
+	}
537
+	/**
538
+	 * Returns the information about the capabilities of fields among multiple indices.
539
+	 *
540
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
541
+	 *
542
+	 * @param array{
543
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
544
+	 *     fields: list, // A comma-separated list of field names
545
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
546
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
547
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
548
+	 *     include_unmapped: boolean, // Indicates whether unmapped fields should be included in the response.
549
+	 *     filters: list, // An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
550
+	 *     types: list, // Only return results for fields that have one of the types in the list
551
+	 *     include_empty_fields: boolean, // Include empty fields in result
552
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
553
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
554
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
555
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
556
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
557
+	 *     body: array, //  An index filter specified with the Query DSL
558
+	 * } $params
559
+	 *
560
+	 * @throws NoNodeAvailableException if all the hosts are offline
561
+	 * @throws ClientResponseException if the status code of response is 4xx
562
+	 * @throws ServerResponseException if the status code of response is 5xx
563
+	 *
564
+	 * @return Elasticsearch|Promise
565
+	 */
566
+	public function fieldCaps(array $params = [])
567
+	{
568
+		if (isset($params['index'])) {
569
+			$url = '/' . $this->encode($params['index']) . '/_field_caps';
570
+			$method = empty($params['body']) ? 'GET' : 'POST';
571
+		} else {
572
+			$url = '/_field_caps';
573
+			$method = empty($params['body']) ? 'GET' : 'POST';
574
+		}
575
+		$url = $this->addQueryString($url, $params, ['fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'include_unmapped', 'filters', 'types', 'include_empty_fields', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
576
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
577
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
578
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'field_caps');
579
+		return $this->sendRequest($request);
580
+	}
581
+	/**
582
+	 * Returns a document.
583
+	 *
584
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
585
+	 *
586
+	 * @param array{
587
+	 *     id: string, // (REQUIRED) The document ID
588
+	 *     index: string, // (REQUIRED) The name of the index
589
+	 *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
590
+	 *     stored_fields: list, // A comma-separated list of stored fields to return in the response
591
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
592
+	 *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
593
+	 *     refresh: boolean, // Refresh the shard containing the document before performing the operation
594
+	 *     routing: string, // Specific routing value
595
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
596
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
597
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
598
+	 *     version: number, // Explicit version number for concurrency control
599
+	 *     version_type: enum, // Specific version type
600
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
601
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
602
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
603
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
604
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
605
+	 * } $params
606
+	 *
607
+	 * @throws MissingParameterException if a required parameter is missing
608
+	 * @throws NoNodeAvailableException if all the hosts are offline
609
+	 * @throws ClientResponseException if the status code of response is 4xx
610
+	 * @throws ServerResponseException if the status code of response is 5xx
611
+	 *
612
+	 * @return Elasticsearch|Promise
613
+	 */
614
+	public function get(array $params = [])
615
+	{
616
+		$this->checkRequiredParameters(['id', 'index'], $params);
617
+		$url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
618
+		$method = 'GET';
619
+		$url = $this->addQueryString($url, $params, ['force_synthetic_source', 'stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
620
+		$headers = ['Accept' => 'application/json'];
621
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
622
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'get');
623
+		return $this->sendRequest($request);
624
+	}
625
+	/**
626
+	 * Returns a script.
627
+	 *
628
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
629
+	 *
630
+	 * @param array{
631
+	 *     id: string, // (REQUIRED) Script ID
632
+	 *     master_timeout: time, // Specify timeout for connection to master
633
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
634
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
635
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
636
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
637
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
638
+	 * } $params
639
+	 *
640
+	 * @throws MissingParameterException if a required parameter is missing
641
+	 * @throws NoNodeAvailableException if all the hosts are offline
642
+	 * @throws ClientResponseException if the status code of response is 4xx
643
+	 * @throws ServerResponseException if the status code of response is 5xx
644
+	 *
645
+	 * @return Elasticsearch|Promise
646
+	 */
647
+	public function getScript(array $params = [])
648
+	{
649
+		$this->checkRequiredParameters(['id'], $params);
650
+		$url = '/_scripts/' . $this->encode($params['id']);
651
+		$method = 'GET';
652
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
653
+		$headers = ['Accept' => 'application/json'];
654
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
655
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'get_script');
656
+		return $this->sendRequest($request);
657
+	}
658
+	/**
659
+	 * Returns all script contexts.
660
+	 *
661
+	 * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html
662
+	 *
663
+	 * @param array{
664
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
665
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
666
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
667
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
668
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
669
+	 * } $params
670
+	 *
671
+	 * @throws NoNodeAvailableException if all the hosts are offline
672
+	 * @throws ClientResponseException if the status code of response is 4xx
673
+	 * @throws ServerResponseException if the status code of response is 5xx
674
+	 *
675
+	 * @return Elasticsearch|Promise
676
+	 */
677
+	public function getScriptContext(array $params = [])
678
+	{
679
+		$url = '/_script_context';
680
+		$method = 'GET';
681
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
682
+		$headers = ['Accept' => 'application/json'];
683
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
684
+		$request = $this->addOtelAttributes($params, [], $request, 'get_script_context');
685
+		return $this->sendRequest($request);
686
+	}
687
+	/**
688
+	 * Returns available script types, languages and contexts
689
+	 *
690
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
691
+	 *
692
+	 * @param array{
693
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
694
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
695
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
696
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
697
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
698
+	 * } $params
699
+	 *
700
+	 * @throws NoNodeAvailableException if all the hosts are offline
701
+	 * @throws ClientResponseException if the status code of response is 4xx
702
+	 * @throws ServerResponseException if the status code of response is 5xx
703
+	 *
704
+	 * @return Elasticsearch|Promise
705
+	 */
706
+	public function getScriptLanguages(array $params = [])
707
+	{
708
+		$url = '/_script_language';
709
+		$method = 'GET';
710
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
711
+		$headers = ['Accept' => 'application/json'];
712
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
713
+		$request = $this->addOtelAttributes($params, [], $request, 'get_script_languages');
714
+		return $this->sendRequest($request);
715
+	}
716
+	/**
717
+	 * Returns the source of a document.
718
+	 *
719
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
720
+	 *
721
+	 * @param array{
722
+	 *     id: string, // (REQUIRED) The document ID
723
+	 *     index: string, // (REQUIRED) The name of the index
724
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
725
+	 *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
726
+	 *     refresh: boolean, // Refresh the shard containing the document before performing the operation
727
+	 *     routing: string, // Specific routing value
728
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
729
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
730
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
731
+	 *     version: number, // Explicit version number for concurrency control
732
+	 *     version_type: enum, // Specific version type
733
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
734
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
735
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
736
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
737
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
738
+	 * } $params
739
+	 *
740
+	 * @throws MissingParameterException if a required parameter is missing
741
+	 * @throws NoNodeAvailableException if all the hosts are offline
742
+	 * @throws ClientResponseException if the status code of response is 4xx
743
+	 * @throws ServerResponseException if the status code of response is 5xx
744
+	 *
745
+	 * @return Elasticsearch|Promise
746
+	 */
747
+	public function getSource(array $params = [])
748
+	{
749
+		$this->checkRequiredParameters(['id', 'index'], $params);
750
+		$url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
751
+		$method = 'GET';
752
+		$url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
753
+		$headers = ['Accept' => 'application/json'];
754
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
755
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'get_source');
756
+		return $this->sendRequest($request);
757
+	}
758
+	/**
759
+	 * Returns the health of the cluster.
760
+	 *
761
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html
762
+	 *
763
+	 * @param array{
764
+	 *     feature: string, //  A feature of the cluster, as returned by the top-level health API
765
+	 *     timeout: time, // Explicit operation timeout
766
+	 *     verbose: boolean, // Opt in for more information about the health of the system
767
+	 *     size: int, // Limit the number of affected resources the health API returns
768
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
769
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
770
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
771
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
772
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
773
+	 * } $params
774
+	 *
775
+	 * @throws NoNodeAvailableException if all the hosts are offline
776
+	 * @throws ClientResponseException if the status code of response is 4xx
777
+	 * @throws ServerResponseException if the status code of response is 5xx
778
+	 *
779
+	 * @return Elasticsearch|Promise
780
+	 */
781
+	public function healthReport(array $params = [])
782
+	{
783
+		if (isset($params['feature'])) {
784
+			$url = '/_health_report/' . $this->encode($params['feature']);
785
+			$method = 'GET';
786
+		} else {
787
+			$url = '/_health_report';
788
+			$method = 'GET';
789
+		}
790
+		$url = $this->addQueryString($url, $params, ['timeout', 'verbose', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
791
+		$headers = ['Accept' => 'application/json'];
792
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
793
+		$request = $this->addOtelAttributes($params, ['feature'], $request, 'health_report');
794
+		return $this->sendRequest($request);
795
+	}
796
+	/**
797
+	 * Creates or updates a document in an index.
798
+	 *
799
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
800
+	 *
801
+	 * @param array{
802
+	 *     id: string, //  Document ID
803
+	 *     index: string, // (REQUIRED) The name of the index
804
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
805
+	 *     op_type: enum, // Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID
806
+	 *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
807
+	 *     routing: string, // Specific routing value
808
+	 *     timeout: time, // Explicit operation timeout
809
+	 *     version: number, // Explicit version number for concurrency control
810
+	 *     version_type: enum, // Specific version type
811
+	 *     if_seq_no: number, // only perform the index operation if the last operation that has changed the document has the specified sequence number
812
+	 *     if_primary_term: number, // only perform the index operation if the last operation that has changed the document has the specified primary term
813
+	 *     pipeline: string, // The pipeline id to preprocess incoming documents with
814
+	 *     require_alias: boolean, // When true, requires destination to be an alias. Default is false
815
+	 *     require_data_stream: boolean, // When true, requires the destination to be a data stream (existing or to-be-created). Default is false
816
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
817
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
818
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
819
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
820
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
821
+	 *     body: array, // (REQUIRED) The document
822
+	 * } $params
823
+	 *
824
+	 * @throws MissingParameterException if a required parameter is missing
825
+	 * @throws NoNodeAvailableException if all the hosts are offline
826
+	 * @throws ClientResponseException if the status code of response is 4xx
827
+	 * @throws ServerResponseException if the status code of response is 5xx
828
+	 *
829
+	 * @return Elasticsearch|Promise
830
+	 */
831
+	public function index(array $params = [])
832
+	{
833
+		$this->checkRequiredParameters(['index', 'body'], $params);
834
+		if (isset($params['id'])) {
835
+			$url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
836
+			$method = 'PUT';
837
+		} else {
838
+			$url = '/' . $this->encode($params['index']) . '/_doc';
839
+			$method = 'POST';
840
+		}
841
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'op_type', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'if_seq_no', 'if_primary_term', 'pipeline', 'require_alias', 'require_data_stream', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
842
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
843
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
844
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'index');
845
+		return $this->sendRequest($request);
846
+	}
847
+	/**
848
+	 * Returns basic information about the cluster.
849
+	 *
850
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
851
+	 *
852
+	 * @param array{
853
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
854
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
855
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
856
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
857
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
858
+	 * } $params
859
+	 *
860
+	 * @throws NoNodeAvailableException if all the hosts are offline
861
+	 * @throws ClientResponseException if the status code of response is 4xx
862
+	 * @throws ServerResponseException if the status code of response is 5xx
863
+	 *
864
+	 * @return Elasticsearch|Promise
865
+	 */
866
+	public function info(array $params = [])
867
+	{
868
+		$url = '/';
869
+		$method = 'GET';
870
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
871
+		$headers = ['Accept' => 'application/json'];
872
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
873
+		$request = $this->addOtelAttributes($params, [], $request, 'info');
874
+		return $this->sendRequest($request);
875
+	}
876
+	/**
877
+	 * Performs a kNN search.
878
+	 *
879
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
880
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
881
+	 *
882
+	 * @param array{
883
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` to perform the operation on all indices
884
+	 *     routing: list, // A comma-separated list of specific routing values
885
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
886
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
887
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
888
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
889
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
890
+	 *     body: array, //  The search definition
891
+	 * } $params
892
+	 *
893
+	 * @throws MissingParameterException if a required parameter is missing
894
+	 * @throws NoNodeAvailableException if all the hosts are offline
895
+	 * @throws ClientResponseException if the status code of response is 4xx
896
+	 * @throws ServerResponseException if the status code of response is 5xx
897
+	 *
898
+	 * @return Elasticsearch|Promise
899
+	 */
900
+	public function knnSearch(array $params = [])
901
+	{
902
+		$this->checkRequiredParameters(['index'], $params);
903
+		$url = '/' . $this->encode($params['index']) . '/_knn_search';
904
+		$method = empty($params['body']) ? 'GET' : 'POST';
905
+		$url = $this->addQueryString($url, $params, ['routing', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
906
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
907
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
908
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'knn_search');
909
+		return $this->sendRequest($request);
910
+	}
911
+	/**
912
+	 * Allows to get multiple documents in one request.
913
+	 *
914
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html
915
+	 *
916
+	 * @param array{
917
+	 *     index: string, //  The name of the index
918
+	 *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
919
+	 *     stored_fields: list, // A comma-separated list of stored fields to return in the response
920
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
921
+	 *     realtime: boolean, // Specify whether to perform the operation in realtime or search mode
922
+	 *     refresh: boolean, // Refresh the shard containing the document before performing the operation
923
+	 *     routing: string, // Specific routing value
924
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
925
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
926
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
927
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
928
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
929
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
930
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
931
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
932
+	 *     body: array, // (REQUIRED) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
933
+	 * } $params
934
+	 *
935
+	 * @throws NoNodeAvailableException if all the hosts are offline
936
+	 * @throws ClientResponseException if the status code of response is 4xx
937
+	 * @throws ServerResponseException if the status code of response is 5xx
938
+	 *
939
+	 * @return Elasticsearch|Promise
940
+	 */
941
+	public function mget(array $params = [])
942
+	{
943
+		$this->checkRequiredParameters(['body'], $params);
944
+		if (isset($params['index'])) {
945
+			$url = '/' . $this->encode($params['index']) . '/_mget';
946
+			$method = empty($params['body']) ? 'GET' : 'POST';
947
+		} else {
948
+			$url = '/_mget';
949
+			$method = empty($params['body']) ? 'GET' : 'POST';
950
+		}
951
+		$url = $this->addQueryString($url, $params, ['force_synthetic_source', 'stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
952
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
953
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
954
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'mget');
955
+		return $this->sendRequest($request);
956
+	}
957
+	/**
958
+	 * Allows to execute several search operations in one request.
959
+	 *
960
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html
961
+	 *
962
+	 * @param array{
963
+	 *     index: list, //  A comma-separated list of index names to use as default
964
+	 *     search_type: enum, // Search operation type
965
+	 *     max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
966
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
967
+	 *     pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
968
+	 *     max_concurrent_shard_requests: number, // The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
969
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
970
+	 *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
971
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
972
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
973
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
974
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
975
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
976
+	 *     body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
977
+	 * } $params
978
+	 *
979
+	 * @throws NoNodeAvailableException if all the hosts are offline
980
+	 * @throws ClientResponseException if the status code of response is 4xx
981
+	 * @throws ServerResponseException if the status code of response is 5xx
982
+	 *
983
+	 * @return Elasticsearch|Promise
984
+	 */
985
+	public function msearch(array $params = [])
986
+	{
987
+		$this->checkRequiredParameters(['body'], $params);
988
+		if (isset($params['index'])) {
989
+			$url = '/' . $this->encode($params['index']) . '/_msearch';
990
+			$method = empty($params['body']) ? 'GET' : 'POST';
991
+		} else {
992
+			$url = '/_msearch';
993
+			$method = empty($params['body']) ? 'GET' : 'POST';
994
+		}
995
+		$url = $this->addQueryString($url, $params, ['search_type', 'max_concurrent_searches', 'typed_keys', 'pre_filter_shard_size', 'max_concurrent_shard_requests', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
996
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
997
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
998
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'msearch');
999
+		return $this->sendRequest($request);
1000
+	}
1001
+	/**
1002
+	 * Allows to execute several search template operations in one request.
1003
+	 *
1004
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
1005
+	 *
1006
+	 * @param array{
1007
+	 *     index: list, //  A comma-separated list of index names to use as default
1008
+	 *     search_type: enum, // Search operation type
1009
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1010
+	 *     max_concurrent_searches: number, // Controls the maximum number of concurrent searches the multi search api will execute
1011
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1012
+	 *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1013
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1014
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1015
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1016
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1017
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1018
+	 *     body: array, // (REQUIRED) The request definitions (metadata-search request definition pairs), separated by newlines
1019
+	 * } $params
1020
+	 *
1021
+	 * @throws NoNodeAvailableException if all the hosts are offline
1022
+	 * @throws ClientResponseException if the status code of response is 4xx
1023
+	 * @throws ServerResponseException if the status code of response is 5xx
1024
+	 *
1025
+	 * @return Elasticsearch|Promise
1026
+	 */
1027
+	public function msearchTemplate(array $params = [])
1028
+	{
1029
+		$this->checkRequiredParameters(['body'], $params);
1030
+		if (isset($params['index'])) {
1031
+			$url = '/' . $this->encode($params['index']) . '/_msearch/template';
1032
+			$method = empty($params['body']) ? 'GET' : 'POST';
1033
+		} else {
1034
+			$url = '/_msearch/template';
1035
+			$method = empty($params['body']) ? 'GET' : 'POST';
1036
+		}
1037
+		$url = $this->addQueryString($url, $params, ['search_type', 'typed_keys', 'max_concurrent_searches', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1038
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
1039
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1040
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'msearch_template');
1041
+		return $this->sendRequest($request);
1042
+	}
1043
+	/**
1044
+	 * Returns multiple termvectors in one request.
1045
+	 *
1046
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html
1047
+	 *
1048
+	 * @param array{
1049
+	 *     index: string, //  The index in which the document resides.
1050
+	 *     ids: list, // A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
1051
+	 *     term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1052
+	 *     field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1053
+	 *     fields: list, // A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1054
+	 *     offsets: boolean, // Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1055
+	 *     positions: boolean, // Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1056
+	 *     payloads: boolean, // Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1057
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
1058
+	 *     routing: string, // Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
1059
+	 *     realtime: boolean, // Specifies if requests are real-time as opposed to near-real-time (default: true).
1060
+	 *     version: number, // Explicit version number for concurrency control
1061
+	 *     version_type: enum, // Specific version type
1062
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1063
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1064
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1065
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1066
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1067
+	 *     body: array, //  Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.
1068
+	 * } $params
1069
+	 *
1070
+	 * @throws NoNodeAvailableException if all the hosts are offline
1071
+	 * @throws ClientResponseException if the status code of response is 4xx
1072
+	 * @throws ServerResponseException if the status code of response is 5xx
1073
+	 *
1074
+	 * @return Elasticsearch|Promise
1075
+	 */
1076
+	public function mtermvectors(array $params = [])
1077
+	{
1078
+		if (isset($params['index'])) {
1079
+			$url = '/' . $this->encode($params['index']) . '/_mtermvectors';
1080
+			$method = empty($params['body']) ? 'GET' : 'POST';
1081
+		} else {
1082
+			$url = '/_mtermvectors';
1083
+			$method = empty($params['body']) ? 'GET' : 'POST';
1084
+		}
1085
+		$url = $this->addQueryString($url, $params, ['ids', 'term_statistics', 'field_statistics', 'fields', 'offsets', 'positions', 'payloads', 'preference', 'routing', 'realtime', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1086
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1087
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1088
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'mtermvectors');
1089
+		return $this->sendRequest($request);
1090
+	}
1091
+	/**
1092
+	 * Open a point in time that can be used in subsequent searches
1093
+	 *
1094
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html
1095
+	 *
1096
+	 * @param array{
1097
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices
1098
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1099
+	 *     routing: string, // Specific routing value
1100
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1101
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1102
+	 *     keep_alive: string, // Specific the time to live for the point in time
1103
+	 *     allow_partial_search_results: boolean, // Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false)
1104
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1105
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1106
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1107
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1108
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1109
+	 *     body: array, //  An index_filter specified with the Query DSL
1110
+	 * } $params
1111
+	 *
1112
+	 * @throws MissingParameterException if a required parameter is missing
1113
+	 * @throws NoNodeAvailableException if all the hosts are offline
1114
+	 * @throws ClientResponseException if the status code of response is 4xx
1115
+	 * @throws ServerResponseException if the status code of response is 5xx
1116
+	 *
1117
+	 * @return Elasticsearch|Promise
1118
+	 */
1119
+	public function openPointInTime(array $params = [])
1120
+	{
1121
+		$this->checkRequiredParameters(['index', 'keep_alive'], $params);
1122
+		$url = '/' . $this->encode($params['index']) . '/_pit';
1123
+		$method = 'POST';
1124
+		$url = $this->addQueryString($url, $params, ['preference', 'routing', 'ignore_unavailable', 'expand_wildcards', 'keep_alive', 'allow_partial_search_results', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1125
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1126
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1127
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'open_point_in_time');
1128
+		return $this->sendRequest($request);
1129
+	}
1130
+	/**
1131
+	 * Returns whether the cluster is running.
1132
+	 *
1133
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
1134
+	 *
1135
+	 * @param array{
1136
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1137
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1138
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1139
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1140
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1141
+	 * } $params
1142
+	 *
1143
+	 * @throws NoNodeAvailableException if all the hosts are offline
1144
+	 * @throws ClientResponseException if the status code of response is 4xx
1145
+	 * @throws ServerResponseException if the status code of response is 5xx
1146
+	 *
1147
+	 * @return Elasticsearch|Promise
1148
+	 */
1149
+	public function ping(array $params = [])
1150
+	{
1151
+		$url = '/';
1152
+		$method = 'HEAD';
1153
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1154
+		$headers = ['Accept' => 'application/json'];
1155
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1156
+		$request = $this->addOtelAttributes($params, [], $request, 'ping');
1157
+		return $this->sendRequest($request);
1158
+	}
1159
+	/**
1160
+	 * Creates or updates a script.
1161
+	 *
1162
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
1163
+	 *
1164
+	 * @param array{
1165
+	 *     id: string, // (REQUIRED) Script ID
1166
+	 *     context: string, //  Script context
1167
+	 *     timeout: time, // Explicit operation timeout
1168
+	 *     master_timeout: time, // Specify timeout for connection to master
1169
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1170
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1171
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1172
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1173
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1174
+	 *     body: array, // (REQUIRED) The document
1175
+	 * } $params
1176
+	 *
1177
+	 * @throws MissingParameterException if a required parameter is missing
1178
+	 * @throws NoNodeAvailableException if all the hosts are offline
1179
+	 * @throws ClientResponseException if the status code of response is 4xx
1180
+	 * @throws ServerResponseException if the status code of response is 5xx
1181
+	 *
1182
+	 * @return Elasticsearch|Promise
1183
+	 */
1184
+	public function putScript(array $params = [])
1185
+	{
1186
+		$this->checkRequiredParameters(['id', 'body'], $params);
1187
+		if (isset($params['context'])) {
1188
+			$url = '/_scripts/' . $this->encode($params['id']) . '/' . $this->encode($params['context']);
1189
+			$method = 'PUT';
1190
+		} else {
1191
+			$url = '/_scripts/' . $this->encode($params['id']);
1192
+			$method = 'PUT';
1193
+		}
1194
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1195
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1196
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1197
+		$request = $this->addOtelAttributes($params, ['id', 'context'], $request, 'put_script');
1198
+		return $this->sendRequest($request);
1199
+	}
1200
+	/**
1201
+	 * Allows to evaluate the quality of ranked search results over a set of typical search queries
1202
+	 *
1203
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html
1204
+	 *
1205
+	 * @param array{
1206
+	 *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1207
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1208
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1209
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1210
+	 *     search_type: enum, // Search operation type
1211
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1212
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1213
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1214
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1215
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1216
+	 *     body: array, // (REQUIRED) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
1217
+	 * } $params
1218
+	 *
1219
+	 * @throws NoNodeAvailableException if all the hosts are offline
1220
+	 * @throws ClientResponseException if the status code of response is 4xx
1221
+	 * @throws ServerResponseException if the status code of response is 5xx
1222
+	 *
1223
+	 * @return Elasticsearch|Promise
1224
+	 */
1225
+	public function rankEval(array $params = [])
1226
+	{
1227
+		$this->checkRequiredParameters(['body'], $params);
1228
+		if (isset($params['index'])) {
1229
+			$url = '/' . $this->encode($params['index']) . '/_rank_eval';
1230
+			$method = empty($params['body']) ? 'GET' : 'POST';
1231
+		} else {
1232
+			$url = '/_rank_eval';
1233
+			$method = empty($params['body']) ? 'GET' : 'POST';
1234
+		}
1235
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'search_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1236
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1237
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1238
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'rank_eval');
1239
+		return $this->sendRequest($request);
1240
+	}
1241
+	/**
1242
+	 * Allows to copy documents from one index to another, optionally filtering the source
1243
+	 * documents by a query, changing the destination index settings, or fetching the
1244
+	 * documents from a remote cluster.
1245
+	 *
1246
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
1247
+	 *
1248
+	 * @param array{
1249
+	 *     refresh: boolean, // Should the affected indexes be refreshed?
1250
+	 *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
1251
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1252
+	 *     wait_for_completion: boolean, // Should the request should block until the reindex is complete.
1253
+	 *     requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
1254
+	 *     scroll: time, // Control how long to keep the search context alive
1255
+	 *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
1256
+	 *     max_docs: number, // Maximum number of documents to process (default: all documents)
1257
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1258
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1259
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1260
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1261
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1262
+	 *     body: array, // (REQUIRED) The search definition using the Query DSL and the prototype for the index request.
1263
+	 * } $params
1264
+	 *
1265
+	 * @throws NoNodeAvailableException if all the hosts are offline
1266
+	 * @throws ClientResponseException if the status code of response is 4xx
1267
+	 * @throws ServerResponseException if the status code of response is 5xx
1268
+	 *
1269
+	 * @return Elasticsearch|Promise
1270
+	 */
1271
+	public function reindex(array $params = [])
1272
+	{
1273
+		$this->checkRequiredParameters(['body'], $params);
1274
+		$url = '/_reindex';
1275
+		$method = 'POST';
1276
+		$url = $this->addQueryString($url, $params, ['refresh', 'timeout', 'wait_for_active_shards', 'wait_for_completion', 'requests_per_second', 'scroll', 'slices', 'max_docs', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1277
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1278
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1279
+		$request = $this->addOtelAttributes($params, [], $request, 'reindex');
1280
+		return $this->sendRequest($request);
1281
+	}
1282
+	/**
1283
+	 * Changes the number of requests per second for a particular Reindex operation.
1284
+	 *
1285
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html
1286
+	 *
1287
+	 * @param array{
1288
+	 *     task_id: string, // (REQUIRED) The task id to rethrottle
1289
+	 *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
1290
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1291
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1292
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1293
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1294
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1295
+	 * } $params
1296
+	 *
1297
+	 * @throws MissingParameterException if a required parameter is missing
1298
+	 * @throws NoNodeAvailableException if all the hosts are offline
1299
+	 * @throws ClientResponseException if the status code of response is 4xx
1300
+	 * @throws ServerResponseException if the status code of response is 5xx
1301
+	 *
1302
+	 * @return Elasticsearch|Promise
1303
+	 */
1304
+	public function reindexRethrottle(array $params = [])
1305
+	{
1306
+		$this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1307
+		$url = '/_reindex/' . $this->encode($params['task_id']) . '/_rethrottle';
1308
+		$method = 'POST';
1309
+		$url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1310
+		$headers = ['Accept' => 'application/json'];
1311
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1312
+		$request = $this->addOtelAttributes($params, ['task_id'], $request, 'reindex_rethrottle');
1313
+		return $this->sendRequest($request);
1314
+	}
1315
+	/**
1316
+	 * Allows to use the Mustache language to pre-render a search definition.
1317
+	 *
1318
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html
1319
+	 *
1320
+	 * @param array{
1321
+	 *     id: string, //  The id of the stored search template
1322
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1323
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1324
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1325
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1326
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1327
+	 *     body: array, //  The search definition template and its params
1328
+	 * } $params
1329
+	 *
1330
+	 * @throws NoNodeAvailableException if all the hosts are offline
1331
+	 * @throws ClientResponseException if the status code of response is 4xx
1332
+	 * @throws ServerResponseException if the status code of response is 5xx
1333
+	 *
1334
+	 * @return Elasticsearch|Promise
1335
+	 */
1336
+	public function renderSearchTemplate(array $params = [])
1337
+	{
1338
+		if (isset($params['id'])) {
1339
+			$url = '/_render/template/' . $this->encode($params['id']);
1340
+			$method = empty($params['body']) ? 'GET' : 'POST';
1341
+		} else {
1342
+			$url = '/_render/template';
1343
+			$method = empty($params['body']) ? 'GET' : 'POST';
1344
+		}
1345
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1346
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1347
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1348
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'render_search_template');
1349
+		return $this->sendRequest($request);
1350
+	}
1351
+	/**
1352
+	 * Allows an arbitrary script to be executed and a result to be returned
1353
+	 *
1354
+	 * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html
1355
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1356
+	 *
1357
+	 * @param array{
1358
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1359
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1360
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1361
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1362
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1363
+	 *     body: array, //  The script to execute
1364
+	 * } $params
1365
+	 *
1366
+	 * @throws NoNodeAvailableException if all the hosts are offline
1367
+	 * @throws ClientResponseException if the status code of response is 4xx
1368
+	 * @throws ServerResponseException if the status code of response is 5xx
1369
+	 *
1370
+	 * @return Elasticsearch|Promise
1371
+	 */
1372
+	public function scriptsPainlessExecute(array $params = [])
1373
+	{
1374
+		$url = '/_scripts/painless/_execute';
1375
+		$method = empty($params['body']) ? 'GET' : 'POST';
1376
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1377
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1378
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1379
+		$request = $this->addOtelAttributes($params, [], $request, 'scripts_painless_execute');
1380
+		return $this->sendRequest($request);
1381
+	}
1382
+	/**
1383
+	 * Allows to retrieve a large numbers of results from a single search request.
1384
+	 *
1385
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll
1386
+	 *
1387
+	 * @param array{
1388
+	 *     scroll_id: string, //  The scroll ID
1389
+	 *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1390
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1391
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1392
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1393
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1394
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1395
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1396
+	 *     body: array, //  The scroll ID if not passed by URL or query parameter.
1397
+	 * } $params
1398
+	 *
1399
+	 * @throws NoNodeAvailableException if all the hosts are offline
1400
+	 * @throws ClientResponseException if the status code of response is 4xx
1401
+	 * @throws ServerResponseException if the status code of response is 5xx
1402
+	 *
1403
+	 * @return Elasticsearch|Promise
1404
+	 */
1405
+	public function scroll(array $params = [])
1406
+	{
1407
+		if (isset($params['scroll_id'])) {
1408
+			$url = '/_search/scroll/' . $this->encode($params['scroll_id']);
1409
+			$method = empty($params['body']) ? 'GET' : 'POST';
1410
+		} else {
1411
+			$url = '/_search/scroll';
1412
+			$method = empty($params['body']) ? 'GET' : 'POST';
1413
+		}
1414
+		$url = $this->addQueryString($url, $params, ['scroll', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1415
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1416
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1417
+		$request = $this->addOtelAttributes($params, ['scroll_id'], $request, 'scroll');
1418
+		return $this->sendRequest($request);
1419
+	}
1420
+	/**
1421
+	 * Returns results matching a query.
1422
+	 *
1423
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
1424
+	 *
1425
+	 * @param array{
1426
+	 *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1427
+	 *     analyzer: string, // The analyzer to use for the query string
1428
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
1429
+	 *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1430
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
1431
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
1432
+	 *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
1433
+	 *     stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
1434
+	 *     docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
1435
+	 *     from: number, // Starting offset (default: 0)
1436
+	 *     force_synthetic_source: boolean, // Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
1437
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1438
+	 *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1439
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1440
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1441
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
1442
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1443
+	 *     q: string, // Query in the Lucene query string syntax
1444
+	 *     routing: list, // A comma-separated list of specific routing values
1445
+	 *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1446
+	 *     search_type: enum, // Search operation type
1447
+	 *     size: number, // Number of hits to return (default: 10)
1448
+	 *     sort: list, // A comma-separated list of <field>:<direction> pairs
1449
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
1450
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
1451
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
1452
+	 *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
1453
+	 *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
1454
+	 *     suggest_field: string, // Specify which field to use for suggestions
1455
+	 *     suggest_mode: enum, // Specify suggest mode
1456
+	 *     suggest_size: number, // How many suggestions to return in response
1457
+	 *     suggest_text: string, // The source text for which the suggestions should be returned
1458
+	 *     timeout: time, // Explicit operation timeout
1459
+	 *     track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
1460
+	 *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
1461
+	 *     allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
1462
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1463
+	 *     version: boolean, // Specify whether to return document version as part of a hit
1464
+	 *     seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
1465
+	 *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
1466
+	 *     batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large.
1467
+	 *     max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
1468
+	 *     pre_filter_shard_size: number, // A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
1469
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1470
+	 *     min_compatible_shard_node: string, // The minimum compatible version that all shards involved in search should have for this request to be successful
1471
+	 *     include_named_queries_score: boolean, // Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)
1472
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1473
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1474
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1475
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1476
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1477
+	 *     body: array, //  The search definition using the Query DSL
1478
+	 * } $params
1479
+	 *
1480
+	 * @throws NoNodeAvailableException if all the hosts are offline
1481
+	 * @throws ClientResponseException if the status code of response is 4xx
1482
+	 * @throws ServerResponseException if the status code of response is 5xx
1483
+	 *
1484
+	 * @return Elasticsearch|Promise
1485
+	 */
1486
+	public function search(array $params = [])
1487
+	{
1488
+		if (isset($params['index'])) {
1489
+			$url = '/' . $this->encode($params['index']) . '/_search';
1490
+			$method = empty($params['body']) ? 'GET' : 'POST';
1491
+		} else {
1492
+			$url = '/_search';
1493
+			$method = empty($params['body']) ? 'GET' : 'POST';
1494
+		}
1495
+		$url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'force_synthetic_source', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'min_compatible_shard_node', 'include_named_queries_score', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1496
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1497
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1498
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'search');
1499
+		return $this->sendRequest($request);
1500
+	}
1501
+	/**
1502
+	 * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile.
1503
+	 *
1504
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html
1505
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1506
+	 *
1507
+	 * @param array{
1508
+	 *     index: list, // (REQUIRED) Comma-separated list of data streams, indices, or aliases to search
1509
+	 *     field: string, // (REQUIRED) Field containing geospatial data to return
1510
+	 *     zoom: int, // (REQUIRED) Zoom level for the vector tile to search
1511
+	 *     x: int, // (REQUIRED) X coordinate for the vector tile to search
1512
+	 *     y: int, // (REQUIRED) Y coordinate for the vector tile to search
1513
+	 *     exact_bounds: boolean, // If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation.
1514
+	 *     extent: int, // Size, in pixels, of a side of the vector tile.
1515
+	 *     grid_precision: int, // Additional zoom levels available through the aggs layer. Accepts 0-8.
1516
+	 *     grid_type: enum, // Determines the geometry type for features in the aggs layer.
1517
+	 *     size: int, // Maximum number of features to return in the hits layer. Accepts 0-10000.
1518
+	 *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
1519
+	 *     with_labels: boolean, // If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features.
1520
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1521
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1522
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1523
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1524
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1525
+	 *     body: array, //  Search request body.
1526
+	 * } $params
1527
+	 *
1528
+	 * @throws MissingParameterException if a required parameter is missing
1529
+	 * @throws NoNodeAvailableException if all the hosts are offline
1530
+	 * @throws ClientResponseException if the status code of response is 4xx
1531
+	 * @throws ServerResponseException if the status code of response is 5xx
1532
+	 *
1533
+	 * @return Elasticsearch|Promise
1534
+	 */
1535
+	public function searchMvt(array $params = [])
1536
+	{
1537
+		$this->checkRequiredParameters(['index', 'field', 'zoom', 'x', 'y'], $params);
1538
+		$url = '/' . $this->encode($params['index']) . '/_mvt/' . $this->encode($params['field']) . '/' . $this->encode($params['zoom']) . '/' . $this->encode($params['x']) . '/' . $this->encode($params['y']);
1539
+		$method = empty($params['body']) ? 'GET' : 'POST';
1540
+		$url = $this->addQueryString($url, $params, ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'with_labels', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1541
+		$headers = ['Accept' => 'application/vnd.mapbox-vector-tile', 'Content-Type' => 'application/json'];
1542
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1543
+		$request = $this->addOtelAttributes($params, ['index', 'field', 'zoom', 'x', 'y'], $request, 'search_mvt');
1544
+		return $this->sendRequest($request);
1545
+	}
1546
+	/**
1547
+	 * Returns information about the indices and shards that a search request would be executed against.
1548
+	 *
1549
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html
1550
+	 *
1551
+	 * @param array{
1552
+	 *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1553
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1554
+	 *     routing: string, // Specific routing value
1555
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1556
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1557
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1558
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1559
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
1560
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1561
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1562
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1563
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1564
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1565
+	 * } $params
1566
+	 *
1567
+	 * @throws NoNodeAvailableException if all the hosts are offline
1568
+	 * @throws ClientResponseException if the status code of response is 4xx
1569
+	 * @throws ServerResponseException if the status code of response is 5xx
1570
+	 *
1571
+	 * @return Elasticsearch|Promise
1572
+	 */
1573
+	public function searchShards(array $params = [])
1574
+	{
1575
+		if (isset($params['index'])) {
1576
+			$url = '/' . $this->encode($params['index']) . '/_search_shards';
1577
+			$method = empty($params['body']) ? 'GET' : 'POST';
1578
+		} else {
1579
+			$url = '/_search_shards';
1580
+			$method = empty($params['body']) ? 'GET' : 'POST';
1581
+		}
1582
+		$url = $this->addQueryString($url, $params, ['preference', 'routing', 'local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1583
+		$headers = ['Accept' => 'application/json'];
1584
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1585
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'search_shards');
1586
+		return $this->sendRequest($request);
1587
+	}
1588
+	/**
1589
+	 * Allows to use the Mustache language to pre-render a search definition.
1590
+	 *
1591
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
1592
+	 *
1593
+	 * @param array{
1594
+	 *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1595
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1596
+	 *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1597
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1598
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1599
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1600
+	 *     routing: list, // A comma-separated list of specific routing values
1601
+	 *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1602
+	 *     search_type: enum, // Search operation type
1603
+	 *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
1604
+	 *     profile: boolean, // Specify whether to profile the query execution
1605
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
1606
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
1607
+	 *     ccs_minimize_roundtrips: boolean, // Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
1608
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1609
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1610
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1611
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1612
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1613
+	 *     body: array, // (REQUIRED) The search definition template and its params
1614
+	 * } $params
1615
+	 *
1616
+	 * @throws NoNodeAvailableException if all the hosts are offline
1617
+	 * @throws ClientResponseException if the status code of response is 4xx
1618
+	 * @throws ServerResponseException if the status code of response is 5xx
1619
+	 *
1620
+	 * @return Elasticsearch|Promise
1621
+	 */
1622
+	public function searchTemplate(array $params = [])
1623
+	{
1624
+		$this->checkRequiredParameters(['body'], $params);
1625
+		if (isset($params['index'])) {
1626
+			$url = '/' . $this->encode($params['index']) . '/_search/template';
1627
+			$method = empty($params['body']) ? 'GET' : 'POST';
1628
+		} else {
1629
+			$url = '/_search/template';
1630
+			$method = empty($params['body']) ? 'GET' : 'POST';
1631
+		}
1632
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'preference', 'routing', 'scroll', 'search_type', 'explain', 'profile', 'typed_keys', 'rest_total_hits_as_int', 'ccs_minimize_roundtrips', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1633
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1634
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1635
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'search_template');
1636
+		return $this->sendRequest($request);
1637
+	}
1638
+	/**
1639
+	 * The terms enum API  can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.
1640
+	 *
1641
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html
1642
+	 *
1643
+	 * @param array{
1644
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1645
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1646
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1647
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1648
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1649
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1650
+	 *     body: array, //  field name, string which is the prefix expected in matching terms, timeout and size for max number of results
1651
+	 * } $params
1652
+	 *
1653
+	 * @throws MissingParameterException if a required parameter is missing
1654
+	 * @throws NoNodeAvailableException if all the hosts are offline
1655
+	 * @throws ClientResponseException if the status code of response is 4xx
1656
+	 * @throws ServerResponseException if the status code of response is 5xx
1657
+	 *
1658
+	 * @return Elasticsearch|Promise
1659
+	 */
1660
+	public function termsEnum(array $params = [])
1661
+	{
1662
+		$this->checkRequiredParameters(['index'], $params);
1663
+		$url = '/' . $this->encode($params['index']) . '/_terms_enum';
1664
+		$method = empty($params['body']) ? 'GET' : 'POST';
1665
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1666
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1667
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1668
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'terms_enum');
1669
+		return $this->sendRequest($request);
1670
+	}
1671
+	/**
1672
+	 * Returns information and statistics about terms in the fields of a particular document.
1673
+	 *
1674
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html
1675
+	 *
1676
+	 * @param array{
1677
+	 *     index: string, // (REQUIRED) The index in which the document resides.
1678
+	 *     id: string, //  The id of the document, when not specified a doc param should be supplied.
1679
+	 *     term_statistics: boolean, // Specifies if total term frequency and document frequency should be returned.
1680
+	 *     field_statistics: boolean, // Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
1681
+	 *     fields: list, // A comma-separated list of fields to return.
1682
+	 *     offsets: boolean, // Specifies if term offsets should be returned.
1683
+	 *     positions: boolean, // Specifies if term positions should be returned.
1684
+	 *     payloads: boolean, // Specifies if term payloads should be returned.
1685
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random).
1686
+	 *     routing: string, // Specific routing value.
1687
+	 *     realtime: boolean, // Specifies if request is real-time as opposed to near-real-time (default: true).
1688
+	 *     version: number, // Explicit version number for concurrency control
1689
+	 *     version_type: enum, // Specific version type
1690
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1691
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1692
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1693
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1694
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1695
+	 *     body: array, //  Define parameters and or supply a document to get termvectors for. See documentation.
1696
+	 * } $params
1697
+	 *
1698
+	 * @throws MissingParameterException if a required parameter is missing
1699
+	 * @throws NoNodeAvailableException if all the hosts are offline
1700
+	 * @throws ClientResponseException if the status code of response is 4xx
1701
+	 * @throws ServerResponseException if the status code of response is 5xx
1702
+	 *
1703
+	 * @return Elasticsearch|Promise
1704
+	 */
1705
+	public function termvectors(array $params = [])
1706
+	{
1707
+		$this->checkRequiredParameters(['index'], $params);
1708
+		if (isset($params['id'])) {
1709
+			$url = '/' . $this->encode($params['index']) . '/_termvectors/' . $this->encode($params['id']);
1710
+			$method = empty($params['body']) ? 'GET' : 'POST';
1711
+		} else {
1712
+			$url = '/' . $this->encode($params['index']) . '/_termvectors';
1713
+			$method = empty($params['body']) ? 'GET' : 'POST';
1714
+		}
1715
+		$url = $this->addQueryString($url, $params, ['term_statistics', 'field_statistics', 'fields', 'offsets', 'positions', 'payloads', 'preference', 'routing', 'realtime', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1716
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1717
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1718
+		$request = $this->addOtelAttributes($params, ['index', 'id'], $request, 'termvectors');
1719
+		return $this->sendRequest($request);
1720
+	}
1721
+	/**
1722
+	 * Updates a document with a script or partial document.
1723
+	 *
1724
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
1725
+	 *
1726
+	 * @param array{
1727
+	 *     id: string, // (REQUIRED) Document ID
1728
+	 *     index: string, // (REQUIRED) The name of the index
1729
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1730
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
1731
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
1732
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
1733
+	 *     lang: string, // The script language (default: painless)
1734
+	 *     refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
1735
+	 *     retry_on_conflict: number, // Specify how many times should the operation be retried when a conflict occurs (default: 0)
1736
+	 *     routing: string, // Specific routing value
1737
+	 *     timeout: time, // Explicit operation timeout
1738
+	 *     if_seq_no: number, // only perform the update operation if the last operation that has changed the document has the specified sequence number
1739
+	 *     if_primary_term: number, // only perform the update operation if the last operation that has changed the document has the specified primary term
1740
+	 *     require_alias: boolean, // When true, requires destination is an alias. Default is false
1741
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1742
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1743
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1744
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1745
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1746
+	 *     body: array, // (REQUIRED) The request definition requires either `script` or partial `doc`
1747
+	 * } $params
1748
+	 *
1749
+	 * @throws MissingParameterException if a required parameter is missing
1750
+	 * @throws NoNodeAvailableException if all the hosts are offline
1751
+	 * @throws ClientResponseException if the status code of response is 4xx
1752
+	 * @throws ServerResponseException if the status code of response is 5xx
1753
+	 *
1754
+	 * @return Elasticsearch|Promise
1755
+	 */
1756
+	public function update(array $params = [])
1757
+	{
1758
+		$this->checkRequiredParameters(['id', 'index', 'body'], $params);
1759
+		$url = '/' . $this->encode($params['index']) . '/_update/' . $this->encode($params['id']);
1760
+		$method = 'POST';
1761
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1762
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1763
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1764
+		$request = $this->addOtelAttributes($params, ['id', 'index'], $request, 'update');
1765
+		return $this->sendRequest($request);
1766
+	}
1767
+	/**
1768
+	 * Performs an update on every document in the index without changing the source,
1769
+	 * for example to pick up a mapping change.
1770
+	 *
1771
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
1772
+	 *
1773
+	 * @param array{
1774
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
1775
+	 *     analyzer: string, // The analyzer to use for the query string
1776
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
1777
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
1778
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
1779
+	 *     from: number, // Starting offset (default: 0)
1780
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1781
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1782
+	 *     conflicts: enum, // What to do when the update by query hits version conflicts?
1783
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1784
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
1785
+	 *     pipeline: string, // Ingest pipeline to set on index requests made by this action. (default: none)
1786
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
1787
+	 *     q: string, // Query in the Lucene query string syntax
1788
+	 *     routing: list, // A comma-separated list of specific routing values
1789
+	 *     scroll: time, // Specify how long a consistent view of the index should be maintained for scrolled search
1790
+	 *     search_type: enum, // Search operation type
1791
+	 *     search_timeout: time, // Explicit timeout for each search request. Defaults to no timeout.
1792
+	 *     max_docs: number, // Maximum number of documents to process (default: all documents)
1793
+	 *     sort: list, // A comma-separated list of <field>:<direction> pairs
1794
+	 *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
1795
+	 *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
1796
+	 *     version: boolean, // Specify whether to return document version as part of a hit
1797
+	 *     version_type: boolean, // Should the document increment the version number (internal) on hit or not (reindex)
1798
+	 *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to index level setting
1799
+	 *     refresh: boolean, // Should the affected indexes be refreshed?
1800
+	 *     timeout: time, // Time each individual bulk request should wait for shards that are unavailable.
1801
+	 *     wait_for_active_shards: string, // Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
1802
+	 *     scroll_size: number, // Size on the scroll request powering the update by query
1803
+	 *     wait_for_completion: boolean, // Should the request should block until the update by query operation is complete.
1804
+	 *     requests_per_second: number, // The throttle to set on this request in sub-requests per second. -1 means no throttle.
1805
+	 *     slices: number|string, // The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
1806
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1807
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1808
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1809
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1810
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1811
+	 *     body: array, //  The search definition using the Query DSL
1812
+	 * } $params
1813
+	 *
1814
+	 * @throws MissingParameterException if a required parameter is missing
1815
+	 * @throws NoNodeAvailableException if all the hosts are offline
1816
+	 * @throws ClientResponseException if the status code of response is 4xx
1817
+	 * @throws ServerResponseException if the status code of response is 5xx
1818
+	 *
1819
+	 * @return Elasticsearch|Promise
1820
+	 */
1821
+	public function updateByQuery(array $params = [])
1822
+	{
1823
+		$this->checkRequiredParameters(['index'], $params);
1824
+		$url = '/' . $this->encode($params['index']) . '/_update_by_query';
1825
+		$method = 'POST';
1826
+		$url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1827
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1828
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1829
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'update_by_query');
1830
+		return $this->sendRequest($request);
1831
+	}
1832
+	/**
1833
+	 * Changes the number of requests per second for a particular Update By Query operation.
1834
+	 *
1835
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
1836
+	 *
1837
+	 * @param array{
1838
+	 *     task_id: string, // (REQUIRED) The task id to rethrottle
1839
+	 *     requests_per_second: number, // The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
1840
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1841
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1842
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1843
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1844
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1845
+	 * } $params
1846
+	 *
1847
+	 * @throws MissingParameterException if a required parameter is missing
1848
+	 * @throws NoNodeAvailableException if all the hosts are offline
1849
+	 * @throws ClientResponseException if the status code of response is 4xx
1850
+	 * @throws ServerResponseException if the status code of response is 5xx
1851
+	 *
1852
+	 * @return Elasticsearch|Promise
1853
+	 */
1854
+	public function updateByQueryRethrottle(array $params = [])
1855
+	{
1856
+		$this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1857
+		$url = '/_update_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
1858
+		$method = 'POST';
1859
+		$url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1860
+		$headers = ['Accept' => 'application/json'];
1861
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1862
+		$request = $this->addOtelAttributes($params, ['task_id'], $request, 'update_by_query_rethrottle');
1863
+		return $this->sendRequest($request);
1864
+	}
1865 1865
 }
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Traits;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->checkRequiredParameters(['body'], $params);
64 64
         if (isset($params['index'])) {
65
-            $url = '/' . $this->encode($params['index']) . '/_bulk';
65
+            $url = '/'.$this->encode($params['index']).'/_bulk';
66 66
             $method = 'POST';
67 67
         } else {
68 68
             $url = '/_bulk';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function clearScroll(array $params = [])
99 99
     {
100 100
         if (isset($params['scroll_id'])) {
101
-            $url = '/_search/scroll/' . $this->encode($params['scroll_id']);
101
+            $url = '/_search/scroll/'.$this->encode($params['scroll_id']);
102 102
             $method = 'DELETE';
103 103
         } else {
104 104
             $url = '/_search/scroll';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     public function count(array $params = [])
179 179
     {
180 180
         if (isset($params['index'])) {
181
-            $url = '/' . $this->encode($params['index']) . '/_count';
181
+            $url = '/'.$this->encode($params['index']).'/_count';
182 182
             $method = empty($params['body']) ? 'GET' : 'POST';
183 183
         } else {
184 184
             $url = '/_count';
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     public function create(array $params = [])
226 226
     {
227 227
         $this->checkRequiredParameters(['id', 'index', 'body'], $params);
228
-        $url = '/' . $this->encode($params['index']) . '/_create/' . $this->encode($params['id']);
228
+        $url = '/'.$this->encode($params['index']).'/_create/'.$this->encode($params['id']);
229 229
         $method = 'PUT';
230 230
         $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
231 231
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     public function delete(array $params = [])
267 267
     {
268 268
         $this->checkRequiredParameters(['id', 'index'], $params);
269
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
269
+        $url = '/'.$this->encode($params['index']).'/_doc/'.$this->encode($params['id']);
270 270
         $method = 'DELETE';
271 271
         $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
272 272
         $headers = ['Accept' => 'application/json'];
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
     public function deleteByQuery(array $params = [])
329 329
     {
330 330
         $this->checkRequiredParameters(['index', 'body'], $params);
331
-        $url = '/' . $this->encode($params['index']) . '/_delete_by_query';
331
+        $url = '/'.$this->encode($params['index']).'/_delete_by_query';
332 332
         $method = 'POST';
333 333
         $url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
334 334
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     public function deleteByQueryRethrottle(array $params = [])
362 362
     {
363 363
         $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
364
-        $url = '/_delete_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
364
+        $url = '/_delete_by_query/'.$this->encode($params['task_id']).'/_rethrottle';
365 365
         $method = 'POST';
366 366
         $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
367 367
         $headers = ['Accept' => 'application/json'];
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
     public function deleteScript(array $params = [])
396 396
     {
397 397
         $this->checkRequiredParameters(['id'], $params);
398
-        $url = '/_scripts/' . $this->encode($params['id']);
398
+        $url = '/_scripts/'.$this->encode($params['id']);
399 399
         $method = 'DELETE';
400 400
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
401 401
         $headers = ['Accept' => 'application/json'];
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
     public function exists(array $params = [])
439 439
     {
440 440
         $this->checkRequiredParameters(['id', 'index'], $params);
441
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
441
+        $url = '/'.$this->encode($params['index']).'/_doc/'.$this->encode($params['id']);
442 442
         $method = 'HEAD';
443 443
         $url = $this->addQueryString($url, $params, ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
444 444
         $headers = ['Accept' => 'application/json'];
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
     public function existsSource(array $params = [])
481 481
     {
482 482
         $this->checkRequiredParameters(['id', 'index'], $params);
483
-        $url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
483
+        $url = '/'.$this->encode($params['index']).'/_source/'.$this->encode($params['id']);
484 484
         $method = 'HEAD';
485 485
         $url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
486 486
         $headers = ['Accept' => 'application/json'];
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
     public function explain(array $params = [])
527 527
     {
528 528
         $this->checkRequiredParameters(['id', 'index'], $params);
529
-        $url = '/' . $this->encode($params['index']) . '/_explain/' . $this->encode($params['id']);
529
+        $url = '/'.$this->encode($params['index']).'/_explain/'.$this->encode($params['id']);
530 530
         $method = empty($params['body']) ? 'GET' : 'POST';
531 531
         $url = $this->addQueryString($url, $params, ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
532 532
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
     public function fieldCaps(array $params = [])
567 567
     {
568 568
         if (isset($params['index'])) {
569
-            $url = '/' . $this->encode($params['index']) . '/_field_caps';
569
+            $url = '/'.$this->encode($params['index']).'/_field_caps';
570 570
             $method = empty($params['body']) ? 'GET' : 'POST';
571 571
         } else {
572 572
             $url = '/_field_caps';
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     public function get(array $params = [])
615 615
     {
616 616
         $this->checkRequiredParameters(['id', 'index'], $params);
617
-        $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
617
+        $url = '/'.$this->encode($params['index']).'/_doc/'.$this->encode($params['id']);
618 618
         $method = 'GET';
619 619
         $url = $this->addQueryString($url, $params, ['force_synthetic_source', 'stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
620 620
         $headers = ['Accept' => 'application/json'];
@@ -647,7 +647,7 @@  discard block
 block discarded – undo
647 647
     public function getScript(array $params = [])
648 648
     {
649 649
         $this->checkRequiredParameters(['id'], $params);
650
-        $url = '/_scripts/' . $this->encode($params['id']);
650
+        $url = '/_scripts/'.$this->encode($params['id']);
651 651
         $method = 'GET';
652 652
         $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
653 653
         $headers = ['Accept' => 'application/json'];
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
     public function getSource(array $params = [])
748 748
     {
749 749
         $this->checkRequiredParameters(['id', 'index'], $params);
750
-        $url = '/' . $this->encode($params['index']) . '/_source/' . $this->encode($params['id']);
750
+        $url = '/'.$this->encode($params['index']).'/_source/'.$this->encode($params['id']);
751 751
         $method = 'GET';
752 752
         $url = $this->addQueryString($url, $params, ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
753 753
         $headers = ['Accept' => 'application/json'];
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
     public function healthReport(array $params = [])
782 782
     {
783 783
         if (isset($params['feature'])) {
784
-            $url = '/_health_report/' . $this->encode($params['feature']);
784
+            $url = '/_health_report/'.$this->encode($params['feature']);
785 785
             $method = 'GET';
786 786
         } else {
787 787
             $url = '/_health_report';
@@ -832,10 +832,10 @@  discard block
 block discarded – undo
832 832
     {
833 833
         $this->checkRequiredParameters(['index', 'body'], $params);
834 834
         if (isset($params['id'])) {
835
-            $url = '/' . $this->encode($params['index']) . '/_doc/' . $this->encode($params['id']);
835
+            $url = '/'.$this->encode($params['index']).'/_doc/'.$this->encode($params['id']);
836 836
             $method = 'PUT';
837 837
         } else {
838
-            $url = '/' . $this->encode($params['index']) . '/_doc';
838
+            $url = '/'.$this->encode($params['index']).'/_doc';
839 839
             $method = 'POST';
840 840
         }
841 841
         $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'op_type', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'if_seq_no', 'if_primary_term', 'pipeline', 'require_alias', 'require_data_stream', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
     public function knnSearch(array $params = [])
901 901
     {
902 902
         $this->checkRequiredParameters(['index'], $params);
903
-        $url = '/' . $this->encode($params['index']) . '/_knn_search';
903
+        $url = '/'.$this->encode($params['index']).'/_knn_search';
904 904
         $method = empty($params['body']) ? 'GET' : 'POST';
905 905
         $url = $this->addQueryString($url, $params, ['routing', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
906 906
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
     {
943 943
         $this->checkRequiredParameters(['body'], $params);
944 944
         if (isset($params['index'])) {
945
-            $url = '/' . $this->encode($params['index']) . '/_mget';
945
+            $url = '/'.$this->encode($params['index']).'/_mget';
946 946
             $method = empty($params['body']) ? 'GET' : 'POST';
947 947
         } else {
948 948
             $url = '/_mget';
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
     {
987 987
         $this->checkRequiredParameters(['body'], $params);
988 988
         if (isset($params['index'])) {
989
-            $url = '/' . $this->encode($params['index']) . '/_msearch';
989
+            $url = '/'.$this->encode($params['index']).'/_msearch';
990 990
             $method = empty($params['body']) ? 'GET' : 'POST';
991 991
         } else {
992 992
             $url = '/_msearch';
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
     {
1029 1029
         $this->checkRequiredParameters(['body'], $params);
1030 1030
         if (isset($params['index'])) {
1031
-            $url = '/' . $this->encode($params['index']) . '/_msearch/template';
1031
+            $url = '/'.$this->encode($params['index']).'/_msearch/template';
1032 1032
             $method = empty($params['body']) ? 'GET' : 'POST';
1033 1033
         } else {
1034 1034
             $url = '/_msearch/template';
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
     public function mtermvectors(array $params = [])
1077 1077
     {
1078 1078
         if (isset($params['index'])) {
1079
-            $url = '/' . $this->encode($params['index']) . '/_mtermvectors';
1079
+            $url = '/'.$this->encode($params['index']).'/_mtermvectors';
1080 1080
             $method = empty($params['body']) ? 'GET' : 'POST';
1081 1081
         } else {
1082 1082
             $url = '/_mtermvectors';
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
     public function openPointInTime(array $params = [])
1120 1120
     {
1121 1121
         $this->checkRequiredParameters(['index', 'keep_alive'], $params);
1122
-        $url = '/' . $this->encode($params['index']) . '/_pit';
1122
+        $url = '/'.$this->encode($params['index']).'/_pit';
1123 1123
         $method = 'POST';
1124 1124
         $url = $this->addQueryString($url, $params, ['preference', 'routing', 'ignore_unavailable', 'expand_wildcards', 'keep_alive', 'allow_partial_search_results', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1125 1125
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1185,10 +1185,10 @@  discard block
 block discarded – undo
1185 1185
     {
1186 1186
         $this->checkRequiredParameters(['id', 'body'], $params);
1187 1187
         if (isset($params['context'])) {
1188
-            $url = '/_scripts/' . $this->encode($params['id']) . '/' . $this->encode($params['context']);
1188
+            $url = '/_scripts/'.$this->encode($params['id']).'/'.$this->encode($params['context']);
1189 1189
             $method = 'PUT';
1190 1190
         } else {
1191
-            $url = '/_scripts/' . $this->encode($params['id']);
1191
+            $url = '/_scripts/'.$this->encode($params['id']);
1192 1192
             $method = 'PUT';
1193 1193
         }
1194 1194
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
     {
1227 1227
         $this->checkRequiredParameters(['body'], $params);
1228 1228
         if (isset($params['index'])) {
1229
-            $url = '/' . $this->encode($params['index']) . '/_rank_eval';
1229
+            $url = '/'.$this->encode($params['index']).'/_rank_eval';
1230 1230
             $method = empty($params['body']) ? 'GET' : 'POST';
1231 1231
         } else {
1232 1232
             $url = '/_rank_eval';
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
     public function reindexRethrottle(array $params = [])
1305 1305
     {
1306 1306
         $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1307
-        $url = '/_reindex/' . $this->encode($params['task_id']) . '/_rethrottle';
1307
+        $url = '/_reindex/'.$this->encode($params['task_id']).'/_rethrottle';
1308 1308
         $method = 'POST';
1309 1309
         $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1310 1310
         $headers = ['Accept' => 'application/json'];
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
     public function renderSearchTemplate(array $params = [])
1337 1337
     {
1338 1338
         if (isset($params['id'])) {
1339
-            $url = '/_render/template/' . $this->encode($params['id']);
1339
+            $url = '/_render/template/'.$this->encode($params['id']);
1340 1340
             $method = empty($params['body']) ? 'GET' : 'POST';
1341 1341
         } else {
1342 1342
             $url = '/_render/template';
@@ -1405,7 +1405,7 @@  discard block
 block discarded – undo
1405 1405
     public function scroll(array $params = [])
1406 1406
     {
1407 1407
         if (isset($params['scroll_id'])) {
1408
-            $url = '/_search/scroll/' . $this->encode($params['scroll_id']);
1408
+            $url = '/_search/scroll/'.$this->encode($params['scroll_id']);
1409 1409
             $method = empty($params['body']) ? 'GET' : 'POST';
1410 1410
         } else {
1411 1411
             $url = '/_search/scroll';
@@ -1486,7 +1486,7 @@  discard block
 block discarded – undo
1486 1486
     public function search(array $params = [])
1487 1487
     {
1488 1488
         if (isset($params['index'])) {
1489
-            $url = '/' . $this->encode($params['index']) . '/_search';
1489
+            $url = '/'.$this->encode($params['index']).'/_search';
1490 1490
             $method = empty($params['body']) ? 'GET' : 'POST';
1491 1491
         } else {
1492 1492
             $url = '/_search';
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
     public function searchMvt(array $params = [])
1536 1536
     {
1537 1537
         $this->checkRequiredParameters(['index', 'field', 'zoom', 'x', 'y'], $params);
1538
-        $url = '/' . $this->encode($params['index']) . '/_mvt/' . $this->encode($params['field']) . '/' . $this->encode($params['zoom']) . '/' . $this->encode($params['x']) . '/' . $this->encode($params['y']);
1538
+        $url = '/'.$this->encode($params['index']).'/_mvt/'.$this->encode($params['field']).'/'.$this->encode($params['zoom']).'/'.$this->encode($params['x']).'/'.$this->encode($params['y']);
1539 1539
         $method = empty($params['body']) ? 'GET' : 'POST';
1540 1540
         $url = $this->addQueryString($url, $params, ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'with_labels', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1541 1541
         $headers = ['Accept' => 'application/vnd.mapbox-vector-tile', 'Content-Type' => 'application/json'];
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
     public function searchShards(array $params = [])
1574 1574
     {
1575 1575
         if (isset($params['index'])) {
1576
-            $url = '/' . $this->encode($params['index']) . '/_search_shards';
1576
+            $url = '/'.$this->encode($params['index']).'/_search_shards';
1577 1577
             $method = empty($params['body']) ? 'GET' : 'POST';
1578 1578
         } else {
1579 1579
             $url = '/_search_shards';
@@ -1623,7 +1623,7 @@  discard block
 block discarded – undo
1623 1623
     {
1624 1624
         $this->checkRequiredParameters(['body'], $params);
1625 1625
         if (isset($params['index'])) {
1626
-            $url = '/' . $this->encode($params['index']) . '/_search/template';
1626
+            $url = '/'.$this->encode($params['index']).'/_search/template';
1627 1627
             $method = empty($params['body']) ? 'GET' : 'POST';
1628 1628
         } else {
1629 1629
             $url = '/_search/template';
@@ -1660,7 +1660,7 @@  discard block
 block discarded – undo
1660 1660
     public function termsEnum(array $params = [])
1661 1661
     {
1662 1662
         $this->checkRequiredParameters(['index'], $params);
1663
-        $url = '/' . $this->encode($params['index']) . '/_terms_enum';
1663
+        $url = '/'.$this->encode($params['index']).'/_terms_enum';
1664 1664
         $method = empty($params['body']) ? 'GET' : 'POST';
1665 1665
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1666 1666
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1706,10 +1706,10 @@  discard block
 block discarded – undo
1706 1706
     {
1707 1707
         $this->checkRequiredParameters(['index'], $params);
1708 1708
         if (isset($params['id'])) {
1709
-            $url = '/' . $this->encode($params['index']) . '/_termvectors/' . $this->encode($params['id']);
1709
+            $url = '/'.$this->encode($params['index']).'/_termvectors/'.$this->encode($params['id']);
1710 1710
             $method = empty($params['body']) ? 'GET' : 'POST';
1711 1711
         } else {
1712
-            $url = '/' . $this->encode($params['index']) . '/_termvectors';
1712
+            $url = '/'.$this->encode($params['index']).'/_termvectors';
1713 1713
             $method = empty($params['body']) ? 'GET' : 'POST';
1714 1714
         }
1715 1715
         $url = $this->addQueryString($url, $params, ['term_statistics', 'field_statistics', 'fields', 'offsets', 'positions', 'payloads', 'preference', 'routing', 'realtime', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -1756,7 +1756,7 @@  discard block
 block discarded – undo
1756 1756
     public function update(array $params = [])
1757 1757
     {
1758 1758
         $this->checkRequiredParameters(['id', 'index', 'body'], $params);
1759
-        $url = '/' . $this->encode($params['index']) . '/_update/' . $this->encode($params['id']);
1759
+        $url = '/'.$this->encode($params['index']).'/_update/'.$this->encode($params['id']);
1760 1760
         $method = 'POST';
1761 1761
         $url = $this->addQueryString($url, $params, ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1762 1762
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1821,7 +1821,7 @@  discard block
 block discarded – undo
1821 1821
     public function updateByQuery(array $params = [])
1822 1822
     {
1823 1823
         $this->checkRequiredParameters(['index'], $params);
1824
-        $url = '/' . $this->encode($params['index']) . '/_update_by_query';
1824
+        $url = '/'.$this->encode($params['index']).'/_update_by_query';
1825 1825
         $method = 'POST';
1826 1826
         $url = $this->addQueryString($url, $params, ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1827 1827
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1854,7 +1854,7 @@  discard block
 block discarded – undo
1854 1854
     public function updateByQueryRethrottle(array $params = [])
1855 1855
     {
1856 1856
         $this->checkRequiredParameters(['task_id', 'requests_per_second'], $params);
1857
-        $url = '/_update_by_query/' . $this->encode($params['task_id']) . '/_rethrottle';
1857
+        $url = '/_update_by_query/'.$this->encode($params['task_id']).'/_rethrottle';
1858 1858
         $method = 'POST';
1859 1859
         $url = $this->addQueryString($url, $params, ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1860 1860
         $headers = ['Accept' => 'application/json'];
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Traits/ResponseTrait.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
18 18
 trait ResponseTrait
19 19
 {
20
-    protected ResponseInterface $response;
21
-    public function setResponse(ResponseInterface $response) : self
22
-    {
23
-        $this->response = $response;
24
-        return $this;
25
-    }
26
-    public function getResponse() : ResponseInterface
27
-    {
28
-        return $this->response;
29
-    }
20
+	protected ResponseInterface $response;
21
+	public function setResponse(ResponseInterface $response) : self
22
+	{
23
+		$this->response = $response;
24
+		return $this;
25
+	}
26
+	public function getResponse() : ResponseInterface
27
+	{
28
+		return $this->response;
29
+	}
30 30
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Traits;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Traits;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Psr\Http\Message\ResponseInterface;
18
-trait ResponseTrait
19
-{
18
+trait ResponseTrait {
20 19
     protected ResponseInterface $response;
21 20
     public function setResponse(ResponseInterface $response) : self
22 21
     {
Please login to merge, or discard this patch.