Skip to content

Releases: ruflin/Elastica

Release 5.0.0-beta1

09 Nov 21:10
Compare
Choose a tag to compare

This release is compatible with Elasticsearch 5.0

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::set 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.

Release 3.2.3

23 Sep 10:25
Compare
Choose a tag to compare

Bugfixes

  • Query builder is now compatible with Elasticsearch 2.X

Added

  • Elastica\Aggregation\BucketScript
  • Elastica\Aggregation\SerialDiff
  • Elastica\Query\InnerHits

Improvements

  • Elastica\Client constructor now accepts a transport of fully qualified name. #1169
  • Update Elasticsearch dependency to 2.4.0

Release 3.2.2

23 Aug 13:03
Compare
Choose a tag to compare

Bugfixes

  • Set HTTP headers on each request preventing server error if persistent connection is enabled and compression enabled and later disabled for the same connection.
  • Removed int type hinting in setMinimumMatch (Terms Query): it should also allow string. #1151

Added

  • Elastica\QueryBuilder\DSL\Query::geo_distance
  • Elastica\Aggregation\GeoCentroid #1150
  • Multi value field param for decay function.
  • Elastica\Client::getVersion #1152

Improvements

  • Set PHP 7.0 as default development version
  • Get the root reason from Elasticsearch's error JSON, when available #1111
  • Optimize memory usage for Http Adapter #1161

Changed

  • Remove JSON_ELASTICSEARCH constant as not needed anymore

Release 3.2.1

15 Jun 06:17
Compare
Choose a tag to compare

Backward Compatibility Fixes

  • Reintroduced properties in ResultSet removed in 3.2.0 as deprecated properties to be removed in 4.0

Bugfixes

  • Fix fatal error on Query::addScriptField() if scripts were already set via setScriptFields() #1086
  • Fix namespace collision of Type in Query\Ids #1104

Added

  • Added the concept of ResultSet Transformers. The Transformer adds more information to a Result, for example the original object or data that created the Result. #1066
  • Tidied property initialisation in classes where it was duplicated

Release 3.2.0

02 May 06:33
Compare
Choose a tag to compare

Backward Compatibility Breaks

The BC breaks in this release only affect implementations which modified / extended the ResultSet class.

  • Method \Elastica\ResultSet::create and property \Elastica\ResultSet::$class were removed. To change the ResultSet class, implement your own ResultSet Builder. #1065
  • Properties on \Elastica\ResultSet _totalHits, _maxScore, _took and _timedOut that were originally set on object construction are now accessed by the getters on the ResultSet. #1065

Bugfixes

  • Fix php notice on \Elastica\Index::getAliases() if index has no aliases #1078

Added

  • Update elasticsearch build dependency to elasticsearch 2.3.2 #1084

Improvements

  • Elastica\Type->deleteByQuery($query, $options) $query param can be a query array again #1072 #1073
  • Elastica\Client->connect() allows to establish a connection to ES server when the config was set using method Elastica\Client->setConfigValue() #1076 #1077
  • Elastica\Client constructor now accepts a LoggerInterface and will log both successful and failed requests. #1069

Deprecated

  • Configuring the logger in \Elastica\Client $config constructor is deprecated and will be removed. Use the $logger argument instead. #1069
  • Extracted creation of ResultSet objects to a new dedicated ResultSet\Builder implementation. #1065

Deprecated

  • All properties in the \Elastica\ResultSet class will be moved to private in 4.0. To manipulate the creation of a ResultSet, implement the \Elastica\ResultSet\BuilderInterface and pass your new Builder to the \Elastica\Search instances. #1065

Release 3.1.1

18 Mar 07:57
Compare
Choose a tag to compare

This release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.2.1.

Added

  • Add an "AwsAuthV4" transport that automatically signs requests using credentials from the environment or from the client config. This allows using Elastica with Amazon ElasticSearch Service domains that are restricted to IAM roles or policies. #1056
  • Update elasticsearch build dependency to elasticsearch 2.2.1

Improvements

  • Elastica\Exception\InvalidException will be thrown if you try using an
    Elastica\Aggregation\AbstractSimpleAggregation without setting either the
    field or script param.
  • Elastica\Index->deleteByQuery($query, $options) $query param can be a query array again
  • Elastica\Query\MoreLikeThis->toArray() now supports providing a non-indexed document as an input to perform the comparison.
  • Elastica\Status will lazy load the _stats at when it is needed. #1058

Release 3.1.0

30 Jan 20:40
Compare
Choose a tag to compare

Backward Compatibility Breaks

  • Update Guzzle transport to use Guzzle 6
  • Elastica\Query\FunctionScore::setFilter - deprecated and will throw DeprecatedException since not supported by Elasticsearch. Use setQuery instead.

Added

  • Elastica\Result->getDocument and Elastica\ResultSet->getDocuments for return \Elastica\Document. #960

Improvements

  • Add username and password params to connection

Deprecated

Release 3.0.1

05 Jan 14:01
Compare
Choose a tag to compare

This is a bugfix release to readd nested filters.

Improvements

  • Update build dependency to elasticsearch 2.1.1 #1022
  • Readd \Elastica\Filter\Nested. See #1001 #1020

Release 3.0.0

04 Jan 15:21
Compare
Choose a tag to compare

Backward Compatibility Breaks

  • Revert getError changes in Response object and make it better BC compatible. See comment here.

Bugfixes

  • Function score query: corrected the score_method average to avg #975
  • Set json_decode() assoc parameter to true in Elastica\Response #1005
  • Add bigintConversion to keys passed to connection config in Elastica\Client #1005
  • Use POST instead of PUT to send bulk requests #1010

Added

  • Elastica\Query\MultiMatch::setFuzziness now supports being set to AUTO with the const MultiMatch::FUZZINESS_AUTO
  • Elastica\Type\Mapping::send now accepts query string parameters to send along with the mapping request
  • Elastica\Query\BoolQuery::addFilter

Improvements

  • More info on Elastica\Exception\PartialShardFailureException. Not just number of failed shards.
  • Allow bool in TopHits::setSource function #1012

Deprecated

  • Elastica\Query\Filtered triggers E_USER_DEPRECATED error because filtered query is deprecated since ES 2.0.0-beta1. Use BoolQuery instead.
  • Elastica\QueryBuilder\DSL\Query::filtered() triggers E_USER_DEPRECATED error because filtered query is deprecated since ES 2.0.0-beta1. Use bool() instead.

For more changes from 2.* also see https://github.com/ruflin/Elastica/releases/tag/3.0.0-beta1

Release 3.0.0-beta1

26 Nov 22:09
Compare
Choose a tag to compare

Backward Compatibility Breaks

  • Elastica\AbstractUpdateAction::setPercolate now throw DeprecatedException, user Percolator instead
  • Elastica\AbstractUpdateAction::getPercolate now throw DeprecatedException, user Percolator instead
  • Elastica\AbstractUpdateAction::hasPercolate now throw DeprecatedException, user Percolator instead
  • Elastica\Type::delete now throw DeprecatedException, 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
  • MoreLikeThis::setLikeText deprecated from ES 2.0, use setLike instead, but there is a difference - setLike haven't trim magic inside for strings
  • Elastica\Document, methods: setScript, getScript, hasScript now throw DeprecatedException.
  • MoreLikeThis, methods: setLikeText, setIds, setPercentTermsToMatch now throw DeprecatedException.
  • Elastica\Aggregation\DateHistogram, methods: setPreZone, setPostZone, setPreZoneAdjustLargeInterval, setPreOffset, setPostOffset now throw DeprecatedException.
  • Elastica\Query\Builder trigger E_USER_DEPRECATED error when you try use it.
  • Elastica\Filter\Bool and Elastica\Query\Bool trigger E_USER_DEPRECATED error when you try use them.
  • Elastica\Query\Fuzzy:addField method trigger E_USER_DEPRECATED error
  • Elastica\Query\FunctionScore:addBoostFactorFunction method trigger E_USER_DEPRECATED error
  • Elastica\Query:setLimit method trigger E_USER_DEPRECATED error
  • Elastica\Document:add method trigger E_USER_DEPRECATED error
  • Type::moreLikeThis API was removed from ES 2.0, use MoreLikeThis query instead
  • Remove Thrift transport and everything related to it
  • Remove Memcache transport and everything related to it
  • Remove BulkUdp and everything related to it
  • Remove Facets and everything related to it
  • Remove ansible scripts for tests setup and Vagrantfile as not needed anymore.
    All is based on docker contaienrs now
  • Support for PHP 5.3 removed
  • Elastica\Reponse::getError() now returns and array instead of a string
  • Move function \Elastica\Index\Status::getAliases() and hasAlias(...) to \Elastica\Index::getAliases()
  • Remove \Elastica\Index\Status object and related functions
  • \Elastica\Query\FuzzyLikeThis remove as not supported anymore
  • Remove \Elastica\Status::getServerStatus() as the information was removed
  • DeleteByQuery now requires the delete-by-query plugin isntalled
  • Remove \Elastica\Filter\Nested as it is replaced by \Elastica\Query\Nested
  • Require at least PHP 5.4

Bugfixes

  • Fixed GeoShapeProvided relation parameter position

Added

  • Elastica\Reponse::getErrorMessage was added as getError is now an object
  • Elastica\Query\MoreLikeThis::setLike
  • \Elastica\Exception\DeprecatedException
  • Connection option to convert JSON bigint results to strings can now be set #717

Improvements

  • Travis builds were moved to docker-compose setup. Ansible scripts and Vagrant files were removed
  • trigger_error with E_USER_DEPRECATE added to deprecated places
  • DeprecatedException will be thrown, if there is a call of method that not support BC

Deprecated

  • Elastica\Type::delete is deprecated
  • Elastica\Filter\Bool is deprecated
  • Elastica\Query\Bool is deprecated
  • Elastica\Query\MoreLikeThis::setLikeText is deprecated
  • Elastica\Query\MoreLikeThis::setIds is deprecated