Elastica v6.1.0 Release Notes

  • 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 #1529
    • 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](#1518)
    • 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](#1352)
    • โšก๏ธ 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

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

    Now

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