Skip to content

Commit

Permalink
Indices/Optimize endpoint has been removed in 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfractal committed May 9, 2016
1 parent ef24d5d commit 4f0b9da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 89 deletions.
57 changes: 0 additions & 57 deletions src/Elasticsearch/Endpoints/Indices/Optimize.php

This file was deleted.

32 changes: 0 additions & 32 deletions src/Elasticsearch/Namespaces/IndicesNamespace.php
Expand Up @@ -711,38 +711,6 @@ public function create($params)
return $endpoint->resultOrFuture($response);
}

/**
* $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* ['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true)
* ['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic)
* ['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents
* ['operation_threading'] = () TODO: ?
* ['refresh'] = (boolean) Specify whether the index should be refreshed after performing the operation (default: true)
* ['wait_for_merge'] = (boolean) Specify whether the request should block until the merge process is finished (default: true)
* ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
* ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
*
* @param $params array Associative array of parameters
*
* @return array
*/
public function optimize($params = array())
{
$index = $this->extractArgument($params, 'index');

/** @var callback $endpointBuilder */
$endpointBuilder = $this->endpoints;

/** @var \Elasticsearch\Endpoints\Indices\Optimize $endpoint */
$endpoint = $endpointBuilder('Indices\Optimize');
$endpoint->setIndex($index);
$endpoint->setParams($params);
$response = $endpoint->performRequest();

return $endpoint->resultOrFuture($response);
}

/**
* $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* ['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true)
Expand Down

0 comments on commit 4f0b9da

Please sign in to comment.