extractArgument($params, 'index'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('SearchableSnapshots\ClearCache'); $endpoint->setParams($params); $endpoint->setIndex($index); return $this->performRequest($endpoint); } /** * $params['repository'] = (string) The name of the repository containing the snapshot of the index to mount * $params['snapshot'] = (string) The name of the snapshot of the index to mount * $params['cluster_manager_timeout'] = (time) Explicit operation timeout for connection to cluster_manager node * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) * $params['body'] = (array) The restore configuration for mounting the snapshot as searchable (Required) * * @param array $params Associative array of parameters * @return array * * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release * */ public function mount(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $snapshot = $this->extractArgument($params, 'snapshot'); $body = $this->extractArgument($params, 'body'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('SearchableSnapshots\Mount'); $endpoint->setParams($params); $endpoint->setRepository($repository); $endpoint->setSnapshot($snapshot); $endpoint->setBody($body); return $this->performRequest($endpoint); } /** * $params['repository'] = (string) The repository for which to get the stats for * * @param array $params Associative array of parameters * @return array * * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release * */ public function repositoryStats(array $params = []) { $repository = $this->extractArgument($params, 'repository'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('SearchableSnapshots\RepositoryStats'); $endpoint->setParams($params); $endpoint->setRepository($repository); return $this->performRequest($endpoint); } /** * $params['index'] = (list) A comma-separated list of index names * * @param array $params Associative array of parameters * @return array * * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release * */ public function stats(array $params = []) { $index = $this->extractArgument($params, 'index'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('SearchableSnapshots\Stats'); $endpoint->setParams($params); $endpoint->setIndex($index); return $this->performRequest($endpoint); } }