Elastica v5.0.0-beta1 Release Notes

  • Backward Compatibility Breaks

    • โšก๏ธ Update elasticsearch dependency to 5.0
    • Replace flush refresh param with a options array
    • ๐Ÿ“‡ Rename Mapping::setFields to Mapping::setStoredFields
    • โœ… Removing all deprecated filters including tests. Use queries instead.
    • Remove deprecated Elastica\Script*.php classes. Use Elastica\Script* instead.
    • โœ‚ Remove Elastica/Query/Image.php and test/Elastica/Query/ImageTest.php, no more support for image-plugin.
    • โœ‚ Remove Elastica/Query/Filtered.php and test/Elastica/Query/FilteredTest.php and all uses from code.
    • โœ‚ Remove index.merge.policy.merge_factor, and set/get MergePolicy as it looks deprecated from ES 1.6
    • โž• Add new "Percolate query" functionality and tests
    • โœ‚ Remove in Elastica\AbstractUpdateAction Option "percolate", getter and setter as deprecated as of ES 1.3. Use Percolator instead.
    • ๐Ÿ—„ Remove in Elastica\Aggregation\DateHistogram Option "pre_zone" is deprecated as of ES 1.5. Use "time_zone" instead
    • ๐Ÿ—„ Remove in Elastica\Aggregation\DateHistogram Option "post_zone" is deprecated as of ES 1.5. Use "time_zone" instead.
    • Remove in Elastica\Aggregation\DateHistogram Option "pre_zone_adjust_large_interval" is deprecated as of ES 1.5. Use "time_zone" instead.
    • โœ‚ Remove in Elastica\Aggregation\DateHistogram Option "pre_offset" is deprecated as of ES 1.5. Use "offset" instead.
    • โœ‚ Remove in Elastica\Aggregation\DateHistogram Option "post_offset" is deprecated as of ES 1.5. Use "offset" instead.
    • โœ‚ Remove Elastica\Document::add as deprecated. Use Elastica\Document::set instead
    • โœ‚ Remove Elastica\Document::setScript() is no longer available as of 0.90.2. See http://elastica.io/migration/0.90.2/upsert.html to migrate.
    • โœ‚ Remove Elastica\Document::getScript() is no longer available as of 0.90.2. See http://elastica.io/migration/0.90.2/upsert.html to migrate.
    • โœ‚ Remove Elastica\Document::hasScript() is no longer available as of 0.90.2. See http://elastica.io/migration/0.90.2/upsert.html to migrate.
    • โœ‚ Remove Elastica/Query::setLimit as deprecated. Use the Elastica/Query::setSize() method
    • โœ‚ Remove Elastica\Query\Builder
    • โœ‚ Remove Elastica\Query\Fuzzy::addField as deprecated. Use Elastica\Query\Fuzzy::setField and Elastica\Query\FuzzysetFieldOption instead.
    • โœ‚ Remove Elastica\Query::setIds as deprecated. Use Elastica\Query::like instead.
    • โœ‚ Remove Elastica\Query::setLikeText as deprecated. Use Elastica\Query::like instead.
    • Remove Elastica\Query Option "percent_terms_to_match" is deprecated as of ES 1.5. Use "minimum_should_match" instead.
    • โœ‚ Remove Elastica\QueryBuilder\DSL\Query "More Like This Field" query is deprecated as of ES 1.4. Use MoreLikeThis query instead.
    • ๐Ÿ”„ Changed visibility from protected to private Elastica\ResultSet::$_position as accessing this property in an extended class is deprecated.
    • ๐Ÿ”„ Changed visibility from protected to private Elastica\ResultSet::$_response as accessing this property in an extended class is deprecated.
    • ๐Ÿ”„ Changed visibility from protected to private Elastica\ResultSet::$_query as accessing this property in an extended class is deprecated.
    • ๐Ÿ”„ Changed visibility from protected to private Elastica\ResultSet::$_results as accessing this property in an extended class is deprecated.
    • โœ‚ Removed Elastica\ResultSet::$_timedOut as deprecated. Use ResultSet->hasTimedOut() instead.
    • โœ‚ Removed Elastica\ResultSet::$_took as deprecated. Use ResultSet->hasTimedOut() instead.
    • โœ‚ Removed Elastica\ResultSet::$_totalHits as deprecated. Use ResultSet->hasTimedOut() instead.
    • โœ‚ Removed Elastica\Type::delete() It is no longer possible to delete the mapping for a type. Instead you should delete the index and recreate it with the new mappings.
    • โœ‚ Removed Elastica\Query\Builder as deprecated. Use new Elastica\QueryBuilder instead.
    • โœ‚ Removed Elastica\Percolator as deprecated. Use new Elastica\Query\Percolate instead.
    • ๐Ÿ”„ Changed Elastica\Index::deleteByQuery() to use new API https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-delete-by-query.html
    • โœ‚ Remove Elastica\ScanAndScroll and test, Scan search type is removed from ElasticSearch 5.0.
    • โœ‚ Remove support for PHP 5.4 and 5.5. Require at least PHP 5.6 #1202
    • โœ‚ Remove groovy as default scripting language
    • โœ‚ Remove search_type=count as it is removed in Elasticsearch 5.0
    • ๐Ÿ—„ Remove fielddata_fields as it has been deprecated in ES5, use parameter docvalue_fields instead

    โž• Added

    • Elastica\QueryBuilder\DSL\Query::exists
    • Elastica\QueryBuilder\DSL\Query::type

    ๐Ÿ‘Œ Improvements

    • โž• Add a constant for the expression language.
    • Health::getIndices returns key=>value result, where key === $indexName. $cluster->getHealth()->getIndices()[$indexName] // or $indices = $cluster->getHealth()->getIndices(); $indices[$indexName]
    • โž• Added a Query::setTrackScores method
    • โœ… Implemented painless as default scripting language in tests
    • โšก๏ธ Updated Dockerfile and elasticsearch.yml to allow inline.script: true
    • โšก๏ธ Updated some Script function to use groovy as now default scripting is painless
      • Elastica\Test\Aggregation\ScriptTest::testAggregationScript
      • Elastica\Test\Aggregation\ScriptTest::testAggregationScriptAsString
      • Elastica\Test\Query\FunctionScoreTest::testScriptScore
      • Elastica\Test\BulkTest::testUpdate
      • Elastica\Test\ClientTest::testUpdateDocumentByScript
      • Elastica\Test\ClientTest::testUpdateDocumentByScriptWithUpsert
      • Elastica\Test\ClientTest::testUpdateDocumentPopulateFields
      • Elastica\Test\ClientTest::testUpdateDocumentPopulateFields
      • Elastica\Test\TypeTest::testUpdateDocument
      • Elastica\Test\TypeTest::testUpdateDocumentWithIdForwardSlashes
      • Elastica\Test\TypeTest::testUpdateDocumentWithParameter
      • Elastica\Test\TypeTest::testUpdateDocumentWithFieldsSource
    • โœ… Composer installations will no longer include tests and other development files.