Elastica v7.0.0-beta1 Release Notes

Release Date: 2019-10-31 // over 4 years ago
  • ๐Ÿš€ 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.
    • 0๏ธโƒฃ 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