Skip to content

Commit 2418e03

Browse files
p365labsruflin
authored andcommitted
removed optimize from Index class as removed from ES 5.x (#1351)
1 parent c46aad9 commit 2418e03

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ All notable changes to this project will be documented in this file based on the
1010
- removed analyzed/not_analyzed on [indices mapping](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/mapping-index.html)
1111
- [store](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/mapping-store.html) field only accepts boolean
1212
- Replace IndexAlreadyExistsException with [ResourceAlreadyExistsException](https://github.com/elastic/elasticsearch/pull/21494) [#1350](https://github.com/ruflin/Elastica/pull/1350)
13-
- in order to delete an index you should not delete by its alias now you should delete using the [concrete index name](https://github.com/elastic/elasticsearch/blob/6.0/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java#L445) [#1348](https://github.com/ruflin/Elastica/pull/1348)
14-
13+
- in order to delete an index you should not delete by its alias now you should delete using the [concrete index name](https://github.com/elastic/elasticsearch/blob/6.0/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java#L445) [#1348](https://github.com/ruflin/Elastica/pull/1348)
14+
- Removed ```optimize``` from Index class as it has been deprecated in ES 2.1 and removed in [ES 5.x+](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-optimize.html) use forcemerge [#1351](https://github.com/ruflin/Elastica/pull/1350)
15+
1516
### Bugfixes
1617
- Enforce [Content-Type requirement on the layer Rest](https://github.com/elastic/elasticsearch/pull/23146), a [PR on Elastica #1301](https://github.com/ruflin/Elastica/issues/1301) solved it (it has been implemented only in the HTTP Transport), but it was not implemented in the Guzzle Transport. [#1349](https://github.com/ruflin/Elastica/pull/1349)
1718

lib/Elastica/Index.php

-19
Original file line numberDiff line numberDiff line change
@@ -200,25 +200,6 @@ public function deleteDocuments(array $docs)
200200
return $this->getClient()->deleteDocuments($docs);
201201
}
202202

203-
/**
204-
* Optimizes search index.
205-
*
206-
* Detailed arguments can be found here in the link
207-
*
208-
* @param array $args OPTIONAL Additional arguments
209-
*
210-
* @return array Server response
211-
*
212-
* @deprecated Replaced by forcemerge
213-
* @link https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-optimize.html
214-
*/
215-
public function optimize($args = [])
216-
{
217-
trigger_error('Deprecated: Elastica\Index::optimize() is deprecated and will be removed in further Elastica releases. Use Elastica\Index::forcemerge() instead.', E_USER_DEPRECATED);
218-
219-
return $this->forcemerge($args);
220-
}
221-
222203
/**
223204
* Force merges index.
224205
*

0 commit comments

Comments
 (0)