Skip to content

Commit e6c7b42

Browse files
committed
Merge branch 'fix/967'
2 parents 011fd17 + ec07a44 commit e6c7b42

21 files changed

+495
-246
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"monolog/monolog": "Allows for client-level logging and tracing"
3434
},
3535
"autoload": {
36+
"files": [
37+
"src/autoload.php"
38+
],
3639
"psr-4": {
3740
"Elasticsearch\\": "src/Elasticsearch/"
3841
}

src/Elasticsearch/Client.php

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
class Client
3434
{
35-
const VERSION = '7.4.0';
35+
const VERSION = '7.4.1';
3636

3737
/**
3838
* @var Transport
@@ -58,31 +58,37 @@ class Client
5858
* @var CatNamespace
5959
*/
6060
protected $cat;
61+
6162
/**
6263
* @var ClusterNamespace
6364
*/
6465
protected $cluster;
66+
6567
/**
6668
* @var IndicesNamespace
6769
*/
6870
protected $indices;
71+
6972
/**
7073
* @var IngestNamespace
7174
*/
7275
protected $ingest;
76+
7377
/**
7478
* @var NodesNamespace
7579
*/
7680
protected $nodes;
81+
7782
/**
7883
* @var SnapshotNamespace
7984
*/
8085
protected $snapshot;
86+
8187
/**
8288
* @var TasksNamespace
8389
*/
8490
protected $tasks;
85-
91+
8692

8793
/**
8894
* Client constructor
@@ -138,7 +144,6 @@ public function bulk(array $params = [])
138144

139145
return $this->performRequest($endpoint);
140146
}
141-
142147
/**
143148
* $params['scroll_id'] = DEPRECATED (list) A comma-separated list of scroll IDs to clear
144149
* $params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
@@ -160,7 +165,6 @@ public function clearScroll(array $params = [])
160165

161166
return $this->performRequest($endpoint);
162167
}
163-
164168
/**
165169
* $params['index'] = (list) A comma-separated list of indices to restrict the results
166170
* $params['type'] = DEPRECATED (list) A comma-separated list of types to restrict the results
@@ -199,7 +203,6 @@ public function count(array $params = [])
199203

200204
return $this->performRequest($endpoint);
201205
}
202-
203206
/**
204207
* $params['id'] = (string) Document ID (Required)
205208
* $params['index'] = (string) The name of the index (Required)
@@ -234,7 +237,6 @@ public function create(array $params = [])
234237

235238
return $this->performRequest($endpoint);
236239
}
237-
238240
/**
239241
* $params['id'] = (string) The document ID (Required)
240242
* $params['index'] = (string) The name of the index (Required)
@@ -267,7 +269,6 @@ public function delete(array $params = [])
267269

268270
return $this->performRequest($endpoint);
269271
}
270-
271272
/**
272273
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required)
273274
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
@@ -324,7 +325,6 @@ public function deleteByQuery(array $params = [])
324325

325326
return $this->performRequest($endpoint);
326327
}
327-
328328
/**
329329
* $params['task_id'] = (string) The task id to rethrottle
330330
* $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
@@ -344,7 +344,6 @@ public function deleteByQueryRethrottle(array $params = [])
344344

345345
return $this->performRequest($endpoint);
346346
}
347-
348347
/**
349348
* $params['id'] = (string) Script ID
350349
* $params['timeout'] = (time) Explicit operation timeout
@@ -365,7 +364,6 @@ public function deleteScript(array $params = [])
365364

366365
return $this->performRequest($endpoint);
367366
}
368-
369367
/**
370368
* $params['id'] = (string) The document ID (Required)
371369
* $params['index'] = (string) The name of the index (Required)
@@ -403,7 +401,6 @@ public function exists(array $params = []): bool
403401

404402
return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
405403
}
406-
407404
/**
408405
* $params['id'] = (string) The document ID (Required)
409406
* $params['index'] = (string) The name of the index (Required)
@@ -440,7 +437,6 @@ public function existsSource(array $params = []): bool
440437

441438
return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
442439
}
443-
444440
/**
445441
* $params['id'] = (string) The document ID (Required)
446442
* $params['index'] = (string) The name of the index (Required)
@@ -480,7 +476,6 @@ public function explain(array $params = [])
480476

481477
return $this->performRequest($endpoint);
482478
}
483-
484479
/**
485480
* $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
486481
* $params['fields'] = (list) A comma-separated list of field names
@@ -504,7 +499,6 @@ public function fieldCaps(array $params = [])
504499

505500
return $this->performRequest($endpoint);
506501
}
507-
508502
/**
509503
* $params['id'] = (string) The document ID (Required)
510504
* $params['index'] = (string) The name of the index (Required)
@@ -539,7 +533,6 @@ public function get(array $params = [])
539533

540534
return $this->performRequest($endpoint);
541535
}
542-
543536
/**
544537
* $params['id'] = (string) Script ID
545538
* $params['master_timeout'] = (time) Specify timeout for connection to master
@@ -559,7 +552,6 @@ public function getScript(array $params = [])
559552

560553
return $this->performRequest($endpoint);
561554
}
562-
563555
/**
564556
* $params['id'] = (string) The document ID (Required)
565557
* $params['index'] = (string) The name of the index (Required)
@@ -593,7 +585,6 @@ public function getSource(array $params = [])
593585

594586
return $this->performRequest($endpoint);
595587
}
596-
597588
/**
598589
* $params['id'] = (string) Document ID
599590
* $params['index'] = (string) The name of the index (Required)
@@ -631,7 +622,6 @@ public function index(array $params = [])
631622

632623
return $this->performRequest($endpoint);
633624
}
634-
635625
/**
636626
*
637627
* @param array $params Associative array of parameters
@@ -647,7 +637,6 @@ public function info(array $params = [])
647637

648638
return $this->performRequest($endpoint);
649639
}
650-
651640
/**
652641
* $params['index'] = (string) The name of the index
653642
* $params['type'] = DEPRECATED (string) The type of the document
@@ -680,7 +669,6 @@ public function mget(array $params = [])
680669

681670
return $this->performRequest($endpoint);
682671
}
683-
684672
/**
685673
* $params['index'] = (list) A comma-separated list of index names to use as default
686674
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default
@@ -712,7 +700,6 @@ public function msearch(array $params = [])
712700

713701
return $this->performRequest($endpoint);
714702
}
715-
716703
/**
717704
* $params['index'] = (list) A comma-separated list of index names to use as default
718705
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default
@@ -741,7 +728,6 @@ public function msearchTemplate(array $params = [])
741728

742729
return $this->performRequest($endpoint);
743730
}
744-
745731
/**
746732
* $params['index'] = (string) The index in which the document resides.
747733
* $params['type'] = DEPRECATED (string) The type of the document.
@@ -770,15 +756,14 @@ public function mtermvectors(array $params = [])
770756
$body = $this->extractArgument($params, 'body');
771757

772758
$endpointBuilder = $this->endpoints;
773-
$endpoint = $endpointBuilder('Mtermvectors');
759+
$endpoint = $endpointBuilder('MTermVectors');
774760
$endpoint->setParams($params);
775761
$endpoint->setIndex($index);
776762
$endpoint->setType($type);
777763
$endpoint->setBody($body);
778764

779765
return $this->performRequest($endpoint);
780766
}
781-
782767
/**
783768
*
784769
* @param array $params Associative array of parameters
@@ -797,7 +782,6 @@ public function ping(array $params = []): bool
797782

798783
return BooleanRequestWrapper::performRequest($endpoint, $this->transport);
799784
}
800-
801785
/**
802786
* $params['id'] = (string) Script ID (Required)
803787
* $params['context'] = (string) Script context
@@ -824,7 +808,6 @@ public function putScript(array $params = [])
824808

825809
return $this->performRequest($endpoint);
826810
}
827-
828811
/**
829812
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
830813
* $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
@@ -852,7 +835,6 @@ public function rankEval(array $params = [])
852835

853836
return $this->performRequest($endpoint);
854837
}
855-
856838
/**
857839
* $params['refresh'] = (boolean) Should the effected indexes be refreshed?
858840
* $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m)
@@ -879,7 +861,6 @@ public function reindex(array $params = [])
879861

880862
return $this->performRequest($endpoint);
881863
}
882-
883864
/**
884865
* $params['task_id'] = (string) The task id to rethrottle
885866
* $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
@@ -899,7 +880,6 @@ public function reindexRethrottle(array $params = [])
899880

900881
return $this->performRequest($endpoint);
901882
}
902-
903883
/**
904884
* $params['id'] = (string) The id of the stored search template
905885
* $params['body'] = (array) The search definition template and its params
@@ -921,7 +901,6 @@ public function renderSearchTemplate(array $params = [])
921901

922902
return $this->performRequest($endpoint);
923903
}
924-
925904
/**
926905
* $params['body'] = (array) The script to execute
927906
*
@@ -943,7 +922,6 @@ public function scriptsPainlessExecute(array $params = [])
943922

944923
return $this->performRequest($endpoint);
945924
}
946-
947925
/**
948926
* $params['scroll_id'] = DEPRECATED (string) The scroll ID
949927
* $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search
@@ -967,7 +945,6 @@ public function scroll(array $params = [])
967945

968946
return $this->performRequest($endpoint);
969947
}
970-
971948
/**
972949
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
973950
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
@@ -1034,7 +1011,6 @@ public function search(array $params = [])
10341011

10351012
return $this->performRequest($endpoint);
10361013
}
1037-
10381014
/**
10391015
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
10401016
* $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
@@ -1059,7 +1035,6 @@ public function searchShards(array $params = [])
10591035

10601036
return $this->performRequest($endpoint);
10611037
}
1062-
10631038
/**
10641039
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
10651040
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
@@ -1096,7 +1071,6 @@ public function searchTemplate(array $params = [])
10961071

10971072
return $this->performRequest($endpoint);
10981073
}
1099-
11001074
/**
11011075
* $params['index'] = (string) The index in which the document resides. (Required)
11021076
* $params['id'] = (string) The id of the document, when not specified a doc param should be supplied.
@@ -1126,7 +1100,7 @@ public function termvectors(array $params = [])
11261100
$body = $this->extractArgument($params, 'body');
11271101

11281102
$endpointBuilder = $this->endpoints;
1129-
$endpoint = $endpointBuilder('Termvectors');
1103+
$endpoint = $endpointBuilder('TermVectors');
11301104
$endpoint->setParams($params);
11311105
$endpoint->setIndex($index);
11321106
$endpoint->setId($id);
@@ -1135,7 +1109,6 @@ public function termvectors(array $params = [])
11351109

11361110
return $this->performRequest($endpoint);
11371111
}
1138-
11391112
/**
11401113
* $params['id'] = (string) Document ID (Required)
11411114
* $params['index'] = (string) The name of the index (Required)
@@ -1174,7 +1147,6 @@ public function update(array $params = [])
11741147

11751148
return $this->performRequest($endpoint);
11761149
}
1177-
11781150
/**
11791151
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required)
11801152
* $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
@@ -1234,7 +1206,6 @@ public function updateByQuery(array $params = [])
12341206

12351207
return $this->performRequest($endpoint);
12361208
}
1237-
12381209
/**
12391210
* $params['task_id'] = (string) The task id to rethrottle
12401211
* $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required)
@@ -1254,37 +1225,30 @@ public function updateByQueryRethrottle(array $params = [])
12541225

12551226
return $this->performRequest($endpoint);
12561227
}
1257-
12581228
public function cat(): CatNamespace
12591229
{
12601230
return $this->cat;
12611231
}
1262-
12631232
public function cluster(): ClusterNamespace
12641233
{
12651234
return $this->cluster;
12661235
}
1267-
12681236
public function indices(): IndicesNamespace
12691237
{
12701238
return $this->indices;
12711239
}
1272-
12731240
public function ingest(): IngestNamespace
12741241
{
12751242
return $this->ingest;
12761243
}
1277-
12781244
public function nodes(): NodesNamespace
12791245
{
12801246
return $this->nodes;
12811247
}
1282-
12831248
public function snapshot(): SnapshotNamespace
12841249
{
12851250
return $this->snapshot;
12861251
}
1287-
12881252
public function tasks(): TasksNamespace
12891253
{
12901254
return $this->tasks;

0 commit comments

Comments
 (0)