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.
\Elastica\Query::$_suggest
property has been renamed to $hasSuggest
and is now private, it should not be used from extending classes #1679\Elastica\Document
expects a string as ID, not an int #1672.\Elastica\Query\GeohashCell
query, use \Elastica\Query\GeoBoundingBox
instead #1672.\Elastica\Type
class, \Elastica\Index
class must be used instead #1666\Elastica\Type
class, \Elastica\Index
class must be used instead #1666\Elastica\Index::__construct()
#1666\Elastica\Query\Type
#1666Elastica\Type
class, Elastica\Index
class must be used instead #1666type
handling from Elastica\Search
class #1666type
handling from Elastica\Bulk
and Elastica\Bulk\Action
classes #1666Elastica\Index::__construct()
#1666Elastica\Query\Type
#1666$reindex->setParam(Reindex::REFRESH, 'wait_for')
instead.Elastica\Search->search()
and Elastica\Search->count()
use request method POST
by default. Same for Elastica\Index
, Elastica\Type\AbstractType
, Elastica\Type
.$_config
field is now a ClientConfiguration
instead of an array\Elastica\Client::_log
, \Elastica\Log
and the log
configuration option. Use the Psr\Log\LoggerInterface $logger
client argument to customize logging.static
instead of self
keyword. This is to increase extendability for classes with factory methods.base_uri
to support connecting to multiple ES hosts. #1618settings
level on json to create an Index in all tests (it worked till 6.x but it shouldn’t work)ParentAggregation
#1616AdjacencyMatrix
aggregation #1642Elastica\SearchableInterface->search()
and Elastica\SearchableInterface->count()
. Same for Elastica\Search
#1441\Elastica\Client
constructor for config argument #1640callable
type hinting to $callback
in Client
constructor. #1659setTrackTotalHits
method to Elastica\Query
#1663AbstractAggregation::setMeta(array)
). #1677This release is compatible with Elasticsearch 6.x and was tested with elasticsearch 6.5.2.
BucketSelector
aggregation #1554DerivativeAggregation
#1553This release is compatible with Elasticsearch 6.x and was tested with elasticsearch 6.2.4.
\Iterator
interface definition that they implement. Specifically, you need to call valid()
on the result set before calling current()
. When using foreach
this is done by PHP automatically. When valid
returns false, the return value of current
is undefined instead of false. #1506
\Elastica\ResultSet::next
returns void
instead of \Elastica\Result|false
\Elastica\Bulk\ResponseSet::current
returns \Elastica\Bulk\Response
instead of \Elastica\Bulk\Response|false
\Elastica\Multi\ResultSet::current
returns \Elastica\ResultSet
instead of \Elastica\ResultSet|false
Elastica\Query\FunctionScore::addRandomScoreFunction
#1529string_distance
option in Term Suggestion #1543Elastica\Query\FunctionScore::addRandomScoreFunction
without $field
parameter is deprecated since ES 6.0 and will fail since ES 7.0 #1522Aggreation\Percentiles
updated to a newer version of the Algorithm (T-Digest 3.2) and Percentiles results changed a bit Have a look at here, so updated tests in order not to fail. #1531)Aggregation\Percentiles
have been updated since Elasticsearch 2.3. In this version compression, HDR histogram
changed their implementations. The missing
field has never been implemented. #1532
Before
json
"compression" : 200,
"method" : "hdr",
"number_of_significant_value_digits" : 3
Now
json
"tdigest": {
"compression" : 200
},
"hdr": {
"number_of_significant_value_digits" : 3
}
Aggregation\Percentiles
#1532This release is compatible with Elasticsearch 6.x and was tested with elasticsearch 6.2.4.
This release is compatible with Elasticsearch 6.x and was tested with elasticsearch 6.0.0.
Util::escapeTerm
. Since v5.1 the documentation states that these symbols cannot be escaped ever.each()
usage to fix PHP 7.2 compatibilitydoc_as_upsert
to be boolean, acording Elastic doc-update documentationClient->deleteDocuments()
. #1419Type->updateDocuments()
, Type->addDocuments()
, Type->addObjects()
, Index->addDocuments()
, Index->updateDocuments()
. #1427This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.4.1.
min_word_len
field in Elastica\Suggest\Term
.
Use min_word_length
instead.Scroll
for closing search context on ES manuallyScroll
This is the firts GA release of the 6.x release cycle. The release is compatible with Elasticsearch 6.x and was tested with Elasticsearch 6.0.0.
For previous breaking changes in 6.0 make sure to also have a look at the breaking changes in 6.0.0-beta1 release.
Scroll
for closing search context on ES manuallyScroll
This is the first pre release of the 6.x release cycle. The release is compatible with Elasticsearch 6.x and was tested with Elasticsearch 6.0.0-rc1.
optimize
from Index class as it has been deprecated in ES 2.1 and removed in ES 5.x+ use forcemerge #1351Query\SpanContaining
, Query\SpanWithin
and Query\SpanNot
#1319This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.4.1.
Query\NumericRange
, use Query\Range
instead #1334scroll_id
inside a json body instead of plain text #1325This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.2.2.
filter_path
for response filtering (e.g. $index->search($query, ['filter_path' => 'hits.hits._source'])
)update_all_types
in type mapping in order to resolve conflicts between fields in different types. Conflicts between fields in different types\Elastica\Query\ParentId
to avoid join with parent documents #1287\Elastica\Reindex
for reindexing between indices #1311other_bucket
and other_bucket_key
paramters on Elastica\Aggregation\Filters
Tool\CrossIndex
use \Elastica\Reindex
instead #1311This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.2.2.
This release adds the official elasticsearch client elasticsearch-php as a dependency. All endpoints from the official client can now also be used in Elastica through requestEndpoint
.
\Elastica\Index\Settings::getBlocksWrite
. Elasticsearch returns all settings as strings and does not normalize bool values.
The getters now return the right bool value for whichever string representation is used like ‘true’, ‘1’, ‘on’, ‘yes’. #1251\Elastica\QueryBuilder\Version\Version240.php
added all new query types to queries array. #1266 #1269\Elastica\Search::count
. #1276\Elastica\Client::requestEndpoint
, \Elastica\Index::requestEndpoint
, \Elastica\Type::requestEndpoint
that allow make requests with official client Endpoint usage. #1275\Elastica\Aggregation\GeoBounds
that computes the bounding box containing all geo_point values for a field. #1271\Elastica\Query\MatchNone
the inverse of MatchAll. #1276\Elastica\Scroll
to avoid one request #1273\Elastica\Exception\ElasticsearchException
which is irrelevant since Elasticsearch now exposes the errors as a structured array instead of a single string.
Use \Elastica\Exception\ResponseException::getResponse::getFullError
instead.prefix_len
& min_word_len
fields in Elastica\Suggest\CandidateGenerator\DirectGenerator
as these now return errors when using the phrase suggester to querying terms.
Use prefix_length
& min_word_length
instead #1282
Use \Elastica\Exception\ResponseException::getResponse::getFullError
instead. #1251This release is compatible with Elasticsearch 5.x and was tested with elasticsearch 5.1.2.
\Elastica\Script\AbstractScript
added the script language as constructor argument and sub-classes must implement getScriptTypeArray
ttl
and timestamp
logic: setters and getters in documents and mapping\Elastica\Query\Missing
: negate \Elastica\Query\Exists
instead\Elastica\Query\TopChildren
\Elastica\Query\MatchPhrase
and \Elastica\Query\MatchPhrasePrefix
do not extend \Elastica\Query\Match
anymore because they do not share exactly the same optionsrouting
option in \Elastica\Index::create
because 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.relation
property of \Elastica\Query\GeoShapeProvided
\Elastica\Script\ScriptId
to reference stored scripts by ID\Elastica\Query\AbstractGeoShape::RELATION_WITHIN
\Elastica\Query\HasParent
to use parent_type
instead of type
. Fixes warning due to field being deprecated.\Elastica\Client::optimizeAll
in favor of \Elastica\Client::forcemergeAll
\Elastica\Query\BoolQuery::setMinimumNumberShouldMatch
in favor of \Elastica\Query\BoolQuery::setMinimumShouldMatch
\Elastica\Query\GeoDistanceRange
: use distance aggregations or sorting instead\Elastica\Query\GeohashCell
\Elastica\Query\Indices
: search on the _index
field instead\Elastica\Query\Match::setFieldType
: use \Elastica\Query\MatchPhrase
and \Elastica\Query\MatchPhrasePrefix
instead\Elastica\Transport\Null
is deprecated because null is a reserved class name in PHP 7. Use \Elastica\Transport\NullTransport
instead.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.
\Elastica\JSON
throws exception with readable message instead of errno\Elastica\JSON::stringify
throws \Elastica\Exception\JSONParseException
on errorThis is the first major release of the Elastica 5.x series. Elastica is now compatible with Elasticsearch 5.0). For all the major changes in Elasticsearch 5.0 check this blog post.
Lots of major changes and breaking changes have gone into this release. Please test this release with Elasticsearch 5.0 and report any issues on Github. A special thank you goes to @p365labs and @Zyqsempai that helped to make this release possible.
Health::getIndices
returns key=>value result, where key === $indexName.1 2 3 4 |
|
Query::setTrackScores
methodThis release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.4.0.
This release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.3.2.
int
type hinting in setMinimumMatch
(Terms
Query): it should also allow string
. #1151This release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.3.2.
Query::addScriptField()
if scripts were already set via setScriptFields()
#1086Type
in Query\Ids
#1104This release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.3.2.
The BC breaks in this release only affect implementations which modified / extended the ResultSet class.
\Elastica\Index::getAliases()
if index has no aliases #1078Elastica\Type->deleteByQuery($query, $options)
$query param can be a query array
again https://github.com/ruflin/Elastica/issues/1072 #1073Elastica\Client->connect()
allows to establish a connection to ES server when the config was set using method Elastica\Client->setConfigValue()
https://github.com/ruflin/Elastica/issues/1076 #1077This release is compatible with Elasticsearch 2.x and was tested with elasticsearch 2.2.1.
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
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. https://github.com/ruflin/Elastica/pull/1058Elastica\Result->getDocument
and Elastica\ResultSet->getDocuments
for return \Elastica\Document
. https://github.com/ruflin/Elastica/issues/960Project | Version | Required |
---|---|---|
Elasticsearch | 2.1.1 | yes |
Elasticsearch mapper attachments plugin | 3.1.1 | no |
Elasticsearch image plugin | 1.7.1 | no |