Releases: ruflin/Elastica
Releases · ruflin/Elastica
Release 5.0.0
This is the first GA release of the Elastica 5.x series. Elastica is now compatible with Elasticsearch 5.0. For all the backward compatibility changes also check 5.0.0-beta1 release notes. For all the major changes in Elasticsearch 5.0 check this blog post.
Backward Compatibility Fixes
- remove _shutdown for Node and Cluster as deprecated
Bugfixes
- Query options such as "timeout" or "terminate_after" should not be ignored when using Multi\Search
Added
- Added regex option form suggest completions https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html#regex
Improvements
\Elastica\JSON
throws exception with readable message instead of errno\Elastica\JSON::stringify
throws\Elastica\Exception\JSONParseException
on error
Release 5.0.0-beta1
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
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
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 insetMinimumMatch
(Terms
Query): it should also allowstring
. #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
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 viasetScriptFields()
#1086 - Fix namespace collision of
Type
inQuery\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
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 queryarray
again #1072 #1073Elastica\Client->connect()
allows to establish a connection to ES server when the config was set using methodElastica\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
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
orscript
param.Elastica\Index->deleteByQuery($query, $options)
$query param can be a queryarray
againElastica\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
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
andElastica\ResultSet->getDocuments
for return\Elastica\Document
. #960
Improvements
- Add username and password params to connection
Deprecated
- Elastica\AbstractScript|Script|ScriptFile|ScriptFields deprecated in favor of Elastica\Script|AbstractScript|Script|ScriptFile|ScriptFields #1028
- Elastica\Filter* are deprecated. You can use proper queries instead. Backward compatibility layer provided, but will be removed in next Elastica releases. See https://www.elastic.co/blog/better-query-execution-coming-elasticsearch-2-0 and #1001
Release 3.0.1
Release 3.0.0
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
toavg
#975 - Set
json_decode()
assoc parameter to true inElastica\Response
#1005 - Add
bigintConversion
to keys passed to connection config inElastica\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 constMultiMatch::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