This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.1.2.
Backward Compatibility Breaks
\Elastica\Script\AbstractScriptadded the script language as constructor argument and sub-classes must implementgetScriptTypeArray
Bugfixes
- Removed features that do not exist in Elasticsearch 5.0 anymore:
ttlandtimestamplogic: setters and getters in documents and mapping\Elastica\Query\Missing: negate\Elastica\Query\Existsinstead\Elastica\Query\TopChildren
\Elastica\Query\MatchPhraseand\Elastica\Query\MatchPhrasePrefixdo not extend\Elastica\Query\Matchanymore because they do not share exactly the same options- Removed the
routingoption in\Elastica\Index::createbecause there is no routing param when creating an index. So that option was doing nothing so far but fails in Elasticearch 5.0 because the non-existing query param is validated. - Fix
relationproperty of\Elastica\Query\GeoShapeProvided
Added
- added
\Elastica\Script\ScriptIdto reference stored scripts by ID - added
\Elastica\Query\AbstractGeoShape::RELATION_WITHIN - Date math in index names is now escaped in URI
- Added a check for paths that already have date math escaped
Improvements
\Elastica\Query\HasParentto useparent_typeinstead oftype. Fixes warning due to field being deprecated.
Deprecated
- Deprecated functionality that is also deprecated in Elasticsearch 5.0:
\Elastica\Client::optimizeAllin favor of\Elastica\Client::forcemergeAll\Elastica\Query\BoolQuery::setMinimumNumberShouldMatchin favor of\Elastica\Query\BoolQuery::setMinimumShouldMatch\Elastica\Query\GeoDistanceRange: use distance aggregations or sorting instead\Elastica\Query\GeohashCell\Elastica\Query\Indices: search on the_indexfield instead\Elastica\Query\Match::setFieldType: use\Elastica\Query\MatchPhraseand\Elastica\Query\MatchPhrasePrefixinstead
\Elastica\Transport\Nullis deprecated because null is a reserved class name in PHP 7. Use\Elastica\Transport\NullTransportinstead.