Skip to content
Pre-release
Pre-release

@ruflin ruflin released this Oct 31, 2019 · 31 commits to master since this release

This is our first release in the 7.x cycle. It is compatible with Elasticsearch 7.x. Please review the breaking changes carefully. Most of them are related to the type removal in Elasticsearch.

Backward Compatibility Breaks

  • The \Elastica\Query::$_suggest property has been renamed to $hasSuggest and is now private, it should not be used from extending classes #1679
  • \Elastica\Document expects a string as ID, not an int #1672.
  • Removed \Elastica\Query\GeohashCell query, use \Elastica\Query\GeoBoundingBox instead #1672.
  • Deprecated usage of \Elastica\Type class, \Elastica\Index class must be used instead #1666
  • Removed \Elastica\Type class, \Elastica\Index class must be used instead #1666
  • Forced index names to string in \Elastica\Index::__construct() #1666
  • Removed Type query \Elastica\Query\Type #1666
  • Removed Elastica\Type class, Elastica\Index class must be used instead #1666
  • Removed type handling from Elastica\Search class #1666
  • Removed type handling from Elastica\Bulk and Elastica\Bulk\Action classes #1666
  • Forced index names to string in Elastica\Index::__construct() #1666
  • Removed Type query Elastica\Query\Type #1666
  • Dropped support for PHP 7.0
  • \Elastica\AbstractUpdateAction::getOptions( $fields ) no longer supports the $underscore parameter, option names must match what elasticsearch expects.
  • Removed no longer supported \Elastica\Query\QueryString::setAutoGeneratePhraseQueries( $bool ) #1622
  • Replaced params._agg with state context variable in scripted metric aggregations
  • Camel Case and underscore parameters deprecated in 6.x have been removed
  • The parameter fields deprecated in 6.x has been removed from Bulk requestedit and Update request.
  • The _parent field has been removed in favour of the join field.
  • hits.total is now an object in the search response hits.total
  • Elastica\Reindex does not return an Index anymore but a Response.
  • Elastica\Reindex->run() does not refresh the new Index after completion anymore. Use $reindex->setParam(Reindex::REFRESH, 'wait_for') instead.
  • Elastica\Search->search() and Elastica\Search->count() use request method POST by default. Same for Elastica\Index, Elastica\Type\AbstractType, Elastica\Type.
  • Elastica\Client $_config field is now a ClientConfiguration instead of an array
  • Removed \Elastica\Client::_log, \Elastica\Log and the log configuration option. Use the Psr\Log\LoggerInterface $logger client argument to customize logging.
  • Changed all factory methods to make use of late static bindings by using static instead of self keyword. This is to increase extendability for classes with factory methods.

Bugfixes

  • Always set the Guzzle base_uri to support connecting to multiple ES hosts. #1618
  • Properly handle underscore prefixes in options and bulk request metadata (cf upstream. #1621
  • Preserve zeros while doing float serialization to JSON. #1635
  • Add settings level on json to create an Index in all tests (it worked till 6.x but it shouldn't work)

Added

  • support for elasticsearch-php ^7.0
  • Added ParentAggregation #1616
  • Elastica\Reindex missing options (script, remote, wait_for_completion, scroll...)
  • Added AdjacencyMatrix aggregation #1642
  • Added request method parameter to Elastica\SearchableInterface->search() and Elastica\SearchableInterface->count(). Same for Elastica\Search#1441
  • Added support for Field Collapsing (Issue: #1392; PR: #1653)
  • Support string DSN in \Elastica\Client constructor for config argument #1640
  • Move Client configuration in a dedicated class
  • Added callable type hinting to $callback in Client constructor. #1659
  • Added setTrackTotalHits method to Elastica\Query#1663
  • Allow metadata to be set on Aggregations (via AbstractAggregation::setMeta(array)). #1677

Improvements

  • Added native_function_invocation CS rule #1606
  • Elasticsearch test version changed from 6.5.2 to 6.6.1 #1620
  • Clear scroll context also when empty page was received #1660
Assets 2

@thePanz thePanz released this Aug 29, 2019 · 192 commits to master since this release

Bugfixes

  • Corrected Histogram aggregations to allow for string interval #1655

Improvements

  • Update elasticsearch-php dependency to 5.4 #1648
  • Add testing on PHP 7.3 on Travis #1647
Assets 2

@ruflin ruflin released this Jan 29, 2019 · 83 commits to master since this release

Added

  • Added BucketSelector aggregation #1554
  • Added DerivativeAggregation #1553
  • The preferred type name is _doc, so that index APIs have the same path as they will have in 7.0
  • Introduced new version of PHP-CS-Fixer and new Lint travis step. #1555

Improvements

  • Reduced memory footprint of response by not keeping the raw JSON data when JSON after JSON has been parsed. #1588
Assets 2

@thePanz thePanz released this Jan 28, 2019 · 192 commits to master since this release

Added

  • [Backported] Added a transport class for mocking a HTTP 403 error codes, useful for testing response failures in inheriting clients #1592
Assets 2

@thePanz thePanz released this Jan 16, 2019 · 8 commits to 5.x since this release

Improvements

  • [Backported] Reduced memory footprint of response by not keeping the raw JSON data after JSON has been parsed. #1588
  • Fix PHPDoc block for ResultSet::current() #1591
  • Fix PHPDoc block for Index:analyze #1586
Assets 2
Jan 11, 2019
Fix #1559 - Backported from #1561 (#1572)
* Fix #1559 - Backported from #1561

@ruflin ruflin released this Mar 5, 2019

  • In PHP 7.2 count() now raises a warning when an invalid parameter is passed. Only arrays and objects implementing the Countable interface should be passed. #1378
    2018-12-19
  • Added codecov configuration
Assets 2

@ruflin ruflin released this Dec 7, 2018 · 96 commits to master since this release

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

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

    Now

      "tdigest": {
        "compression" : 200
      },
      "hdr": {
        "number_of_significant_value_digits" : 3
      }
  • Never implemented the method Missing on Aggregation\Percentiles #1532

Assets 2
Oct 30, 2018
Cleanup changelog
Oct 16, 2018
Backport of #1507 to branch 5.x (#1525)
* Backport of #1507

* Update Type::deleteByQuery annotations
You can’t perform that action at this time.