Elastica 7.0.0-beta1 (download).
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.
This release is compatible with Elasticsearch 7.x and was tested with elasticsearch 7.3.0.
Backward Compatibility Breaks
- The
\Elastica\Query::$_suggestproperty has been renamed to$hasSuggestand is now private, it should not be used from extending classes #1679 \Elastica\Documentexpects a string as ID, not an int #1672.- Removed
\Elastica\Query\GeohashCellquery, use\Elastica\Query\GeoBoundingBoxinstead #1672. - Deprecated usage of
\Elastica\Typeclass,\Elastica\Indexclass must be used instead #1666 - Removed
\Elastica\Typeclass,\Elastica\Indexclass must be used instead #1666 - Forced index names to string in
\Elastica\Index::__construct()#1666 - Removed Type query
\Elastica\Query\Type#1666 - Removed
Elastica\Typeclass,Elastica\Indexclass must be used instead #1666 - Removed
typehandling fromElastica\Searchclass #1666 - Removed
typehandling fromElastica\BulkandElastica\Bulk\Actionclasses #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()andElastica\Search->count()use request methodPOSTby default. Same forElastica\Index,Elastica\Type\AbstractType,Elastica\Type.- Elastica\Client
$_configfield is now aClientConfigurationinstead of an array - Removed
\Elastica\Client::_log,\Elastica\Logand thelogconfiguration option. Use thePsr\Log\LoggerInterface $loggerclient argument to customize logging. - Changed all factory methods to make use of late static bindings by using
staticinstead ofselfkeyword. This is to increase extendability for classes with factory methods.
Bugfixes
- Always set the Guzzle
base_urito 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
settingslevel 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
AdjacencyMatrixaggregation #1642 - Added request method parameter to
Elastica\SearchableInterface->search()andElastica\SearchableInterface->count(). Same forElastica\Search#1441 - Added support for Field Collapsing (Issue: #1392; PR: #1653)
- Support string DSN in
\Elastica\Clientconstructor for config argument #1640 - Move Client configuration in a dedicated class
- Added
callabletype hinting to$callbackinClientconstructor. #1659 - Added
setTrackTotalHitsmethod toElastica\Query#1663 - Allow metadata to be set on Aggregations (via
AbstractAggregation::setMeta(array)). #1677