A PHP client for elasticsearch.

Fork me on GitHub

Release 5.2.0

Elastica 5.2.0 (download).

This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.2.2.

This release adds the official elasticsearch client elasticsearch-php as a dependency. All endpoints from the official client can now also be used in Elastica through requestEndpoint.


  • Fix reading bool index settings like \Elastica\Index\Settings::getBlocksWrite. Elasticsearch returns all settings as strings and does not normalize bool values. The getters now return the right bool value for whichever string representation is used like ‘true’, ‘1’, ‘on’, ‘yes’. #1251
  • Fix for QueryBuilder version check \Elastica\QueryBuilder\Version\Version240.php added all new query types to queries array. #1266 #1269
  • Do not modify the original query in \Elastica\Search::count. #1276


  • Added \Elastica\Client::requestEndpoint, \Elastica\Index::requestEndpoint, \Elastica\Type::requestEndpoint that allow make requests with official client Endpoint usage. #1275
  • Added \Elastica\Aggregation\GeoBounds that computes the bounding box containing all geo_point values for a field. #1271
  • Added \Elastica\Query\MatchNone the inverse of MatchAll. #1276


  • added support for the “explain” flag of AnalyzeAPI #1254
  • added support for the “request_cache” search option #1243
  • skip sending “retry_on_conflict=0” default query param to improve compatibility with Amazon Elasticsearch #1047
  • optimized \Elastica\Scroll to avoid one request #1273
  • Update elasticsearch-php dependency to 5.2.0 #1245
  • Update elasticsearch testing dependency to 5.2.2 #1245


  • Deprecated \Elastica\Exception\ElasticsearchException which is irrelevant since Elasticsearch now exposes the errors as a structured array instead of a single string. Use \Elastica\Exception\ResponseException::getResponse::getFullError instead.
  • Deprecated both prefix_len & min_word_len fields in Elastica\Suggest\CandidateGenerator\DirectGenerator as these now return errors when using the phrase suggester to querying terms. Use prefix_length & min_word_length instead #1282 Use \Elastica\Exception\ResponseException::getResponse::getFullError instead. #1251