Elastica

A PHP client for elasticsearch.

Fork me on GitHub

Release 6.1.0

Elastica 6.1.0 (download).

This release is compatible with Elasticsearch 6.x and was tested with elasticsearch 6.2.4.

Backward Compatibility Breaks

  • Made result sets adhere to \Iterator interface definition that they implement. Specifically, you need to call valid() on the result set before calling current(). When using foreach this is done by PHP automatically. When valid returns false, the return value of current is undefined instead of false. #1506
    • \Elastica\ResultSet::next returns void instead of \Elastica\Result|false
    • \Elastica\Bulk\ResponseSet::current returns \Elastica\Bulk\Response instead of \Elastica\Bulk\Response|false
    • \Elastica\Multi\ResultSet::current returns \Elastica\ResultSet instead of \Elastica\ResultSet|false

Added

  • Added a transport class for mocking a HTTP 403 error codes, useful for testing response failures in inheriting clients
  • Field param for Elastica\Query\FunctionScore::addRandomScoreFunction #1529
  • Index Recovery : the indices recovery API provides insight into on-going index shard recoveries. It was never been implemented into Elastica. #1537
  • add parent_id (reference #1518) in QueryBuilder. #1533)
  • implemented string_distance option in Term Suggestion #1543

Improvements

  • Using Elastica\Query\FunctionScore::addRandomScoreFunction without $field parameter is deprecated since ES 6.0 and will fail since ES 7.0 #1522
  • Aggreation\Percentiles updated to a newer version of the Algorithm (T-Digest 3.2) and Percentiles results changed a bit Have a look at here, so updated tests in order not to fail. #1531)
  • Aggregation\Percentiles have been updated since Elasticsearch 2.3. In this version compression, HDR histogram changed their implementations. The missing field has never been implemented. #1532

    Before json "compression" : 200, "method" : "hdr", "number_of_significant_value_digits" : 3

    Now json "tdigest": { "compression" : 200 }, "hdr": { "number_of_significant_value_digits" : 3 }

  • Never implemented the method Missing on Aggregation\Percentiles #1532