Skip to content

Commit

Permalink
feat: update all comments
Browse files Browse the repository at this point in the history
Signed-off-by: Soner Sayakci <[email protected]>
  • Loading branch information
shyim committed Jul 22, 2022
1 parent b4e83e6 commit 5c60d7c
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 124 deletions.
8 changes: 4 additions & 4 deletions src/OpenSearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public function deleteByQueryRethrottle(array $params = [])
/**
* $params['id'] = (string) Script ID
* $params['timeout'] = (time) Explicit operation timeout
* $params['master_timeout'] = (time) Specify timeout for connection to master
* $params['cluster_manager_timeout'] = (time) Specify timeout for connection to cluster_manager
*
* @param array $params Associative array of parameters
* @return array
Expand Down Expand Up @@ -568,7 +568,7 @@ public function get(array $params = [])
}
/**
* $params['id'] = (string) Script ID
* $params['master_timeout'] = (time) Specify timeout for connection to master
* $params['cluster_manager_timeout'] = (time) Specify timeout for connection to cluster_manager
*
* @param array $params Associative array of parameters
* @return array
Expand Down Expand Up @@ -827,7 +827,7 @@ public function ping(array $params = []): bool
* $params['id'] = (string) Script ID (Required)
* $params['context'] = (string) Script context
* $params['timeout'] = (time) Explicit operation timeout
* $params['master_timeout'] = (time) Specify timeout for connection to master
* $params['cluster_manager_timeout'] = (time) Specify timeout for connection to cluster_manager
* $params['body'] = (array) The document (Required)
*
* @param array $params Associative array of parameters
Expand Down Expand Up @@ -1048,7 +1048,7 @@ public function search(array $params = [])
* $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
* $params['routing'] = (string) Specific routing value
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster manager node (default: false)
* $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
* $params['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)
* $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open)
Expand Down
4 changes: 2 additions & 2 deletions src/OpenSearch/Endpoints/AbstractEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ private function checkForDeprecations(): void
if (array_key_exists($key, $deprecations)) {
$val = $deprecations[$key];

$msg = sprintf('The parameter "%s" is deprecated and will be removed without replacement', $key);
$msg = sprintf('The parameter "%s" is deprecated and will be removed without replacement in the next major version', $key);

if ($val) {
$msg = sprintf('The parameter "%s" is deprecated and will be replaced with parameter "%s"', $key, $val);
$msg = sprintf('The parameter "%s" is deprecated and will be replaced with parameter "%s" in the next major version', $key, $val);
}

trigger_error($msg, E_USER_DEPRECATED);
Expand Down
1 change: 1 addition & 0 deletions src/OpenSearch/Endpoints/Cat/Allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function setNodeId($node_id): Allocation

return $this;
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
52 changes: 26 additions & 26 deletions src/OpenSearch/Namespaces/CatNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CatNamespace extends AbstractNamespace
/**
* $params['name'] = (list) A comma-separated list of alias names to return
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -57,8 +57,8 @@ public function aliases(array $params = [])
* $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand Down Expand Up @@ -162,8 +162,8 @@ public function help(array $params = [])
* $params['index'] = (list) A comma-separated list of index names to limit the returned information
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['health'] = (enum) A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (Options = green,yellow,red)
* $params['help'] = (boolean) Return help information (Default = false)
Expand All @@ -190,8 +190,8 @@ public function indices(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -212,8 +212,8 @@ public function master(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -232,8 +232,8 @@ public function clusterManager(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -254,8 +254,8 @@ public function nodeattrs(array $params = [])
* $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false)
* $params['local'] = (boolean) Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Calculate the selected nodes using the local cluster state rather than the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -275,8 +275,8 @@ public function nodes(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -296,8 +296,8 @@ public function pendingTasks(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand Down Expand Up @@ -342,8 +342,8 @@ public function recovery(array $params = [])
}
/**
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (Default = false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand Down Expand Up @@ -387,8 +387,8 @@ public function segments(array $params = [])
* $params['index'] = (list) A comma-separated list of index names to limit the returned information
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb)
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -413,7 +413,7 @@ public function shards(array $params = [])
* $params['repository'] = (list) Name of repository from which to fetch the snapshot information
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand Down Expand Up @@ -460,8 +460,8 @@ public function tasks(array $params = [])
/**
* $params['name'] = (string) A pattern that returned template names must match
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand All @@ -485,8 +485,8 @@ public function templates(array $params = [])
* $params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output
* $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
* $params['size'] = (enum) The multiplier in which to display values (Options = ,k,m,g,t,p)
* $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
* $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
* $params['local'] = (boolean) Return local information, do not retrieve the state from cluster_manager node (default: false)
* $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node
* $params['h'] = (list) Comma-separated list of column names to display
* $params['help'] = (boolean) Return help information (Default = false)
* $params['s'] = (list) Comma-separated list of column names or column aliases to sort by
Expand Down
Loading

0 comments on commit 5c60d7c

Please sign in to comment.