ruflin/elastica
Elastica is a PHP client for Elasticsearch, providing a rich, object-oriented API for indexing, searching, and managing indices. Compatible with Elasticsearch 9.x+ (branch-specific support for older versions) and integrates with elasticsearch-php.
Elastica\IndexTemplate now works only with new _index_template API. You should use Elastica\Template to use the deprecated API #2274$method argument from the Elastica\SearchableInterface::search and Elastica\SearchableInterface::count as they are not unused anymore. The following classes are affected: Elastica\Search and Elastica\Index #2256Elastica\Request class as constants are not used anymore and no longer needed. #2256bool_prefix #2220addRange using a common trait #2227This a major release with breaking changes. Have a look at the Upgrade guide.
Elastica\Exception\ElasticsearchException -> use Elastica\Exception\ResponseException::getResponse()::getFullError() insteadElastica\Exception\ResponseException::getElasticsearchException() -> use Elastica\Exception\ResponseException::getResponse()::getFullError() insteadElastica\Processor\Append -> use Elastica\Processor\AppendProcessor insteadElastica\Processor\Attachment -> use Elastica\Processor\AttachmentProcessor insteadElastica\Processor\Convert -> use Elastica\Processor\ConvertProcessor insteadElastica\Processor\Date -> use Elastica\Processor\DateProcessor insteadElastica\Processor\DateIndexName -> use Elastica\Processor\DateIndexNameProcessor insteadElastica\Processor\DotExpander -> use Elastica\Processor\DotExpanderProcessor insteadElastica\Processor\Fail -> use Elastica\Processor\FailProcessor insteadElastica\Processor\Join -> use Elastica\Processor\JoinProcessor insteadElastica\Processor\Json -> use Elastica\Processor\JsonProcessor insteadElastica\Processor\Kv -> use Elastica\Processor\KvProcessor insteadElastica\Processor\Lowercase -> use Elastica\Processor\LowercaseProcessor insteadElastica\Processor\Remove -> use Elastica\Processor\RemoveProcessor insteadElastica\Processor\Rename -> use Elastica\Processor\RenameProcessor insteadElastica\Processor\Set -> use Elastica\Processor\SetProcessor insteadElastica\Processor\Sort -> use Elastica\Processor\SortProcessor insteadElastica\Processor\Split -> use Elastica\Processor\SplitProcessor insteadElastica\Processor\Trim -> use Elastica\Processor\AppendProcessor insteadElastica\Processor\Uppercase -> use Elastica\Processor\UppercaseProcessor insteadElastica\Query\Common -> use Elastica\Query\MatchQuery insteadElastica\QueryBuilder\DSL\Query::common_terms() -> use Elastica\QueryBuilder\DSL\Query::match() insteadElastica\Transport\HttpAdapter -> use Elastica\Transport\Http insteadElastica\Aggregation\Range::setKeyedResponse() -> use Elastica\Aggregation\Range::setKeyed() insteadElastica\Bulk::toString() -> use Elastica\Bulk::__toString() or cast to string insteadElastica\Query\MatchQuery::setFieldCutoffFrequency()Elastica\Query\MultiMatch::setCutoffFrequency()Elastica\QueryBuilder\DSL\Aggregation::global_agg() -> use Elastica\QueryBuilder\DSL\Aggregation::global() insteadElastica\Request::toString() -> use Elastica\Request::__toString() or cast to string insteadElastica\Result::getType()Elastica\Suggest\Phrase::addCandidateGenerator() -> use Elastica\Suggest\Phrase::addDirectGenerator() insteadElastica\Util::getParamName()Elastica\Aggregation\AvgBucket: The second argument $bucketsPath is now mandatoryElastica\Aggregation\BucketScript: The second (array $bucketsPath) and the third (string $script) argument are now mandatoryElastica\Aggregation\BucketSelector: The second (array $bucketsPath) and the third (string $script) argument are now mandatoryElastica\Aggregation\Derivative: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\NormalizeAggregation: The second (string $bucketsPath) and the third (string $method) argument are now mandatoryElastica\Aggregation\PercentilesBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\SerialDiff: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\StatsBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\SumBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Cluster\Health::getActiveShardsPercentAsNumber() method to float #2144$origin and $scale parameter types of Elastica\Query\FunctionScore::addDecayFunction() to allow float|int|string #2144$key parameter type of Elastica\Multi\Search::addSearch() to allow int|string|null #2144$options parameter type of Elastica\Index::create() to only allow array<string, mixed> #2147Elastica\Reindex::setWaitForCompletion() to only allow bool #2151Elastica\Search::addIndex(), Elasica\Search::addIndices() and Elastica\Search::hasIndex() parameter type to only allow Elastica\Index #2150$options argument to not accept int in the following methods #2148
Elastica\SearchableInterface::search()Elastica\SearchableInterface::createSearch()Elastica\Search::search()Elastica\Search::createSearch()Elastica\Search::setOptionsAndQuery()Elastica\Index::search()Elastica\Index::createSearch()Elastica\ConnectionElastica\Connection\ConnectionPoolElastica\Connection\Strategy\CallbackStrategyElastica\Connection\Strategy\RoundRobinElastica\Connection\Strategy\SimpleElastica\Connection\Strategy\StrategyFactoryElastica\Connection\Strategy\StrategyInterfaceElastica\Client::setLogger() method #2148strict_types on all classes #2190Elastica\Scroll:clear to use scroll_id body parameter instead of url parameter #2211[@throws](https://github.com/throws) annotations to Client::request and related methods #2152retry_on_conflict from Client configuration in Bulk updates (ported from 7.x #2184)php-cs-fixer to 3.13.2 #2143match expression #2141nyholm/dsn as no longer needed.symfony/deprecation-contracts as no longer needed.Elastica\Query to work with psalm & expand the aggs type to include raw arraysElastica\Exception\ElasticsearchException -> use Elastica\Exception\ResponseException::getResponse()::getFullError() insteadElastica\Exception\ResponseException::getElasticsearchException() -> use Elastica\Exception\ResponseException::getResponse()::getFullError() insteadElastica\Processor\Append -> use Elastica\Processor\AppendProcessor insteadElastica\Processor\Attachment -> use Elastica\Processor\AttachmentProcessor insteadElastica\Processor\Convert -> use Elastica\Processor\ConvertProcessor insteadElastica\Processor\Date -> use Elastica\Processor\DateProcessor insteadElastica\Processor\DateIndexName -> use Elastica\Processor\DateIndexNameProcessor insteadElastica\Processor\DotExpander -> use Elastica\Processor\DotExpanderProcessor insteadElastica\Processor\Fail -> use Elastica\Processor\FailProcessor insteadElastica\Processor\Join -> use Elastica\Processor\JoinProcessor insteadElastica\Processor\Json -> use Elastica\Processor\JsonProcessor insteadElastica\Processor\Kv -> use Elastica\Processor\KvProcessor insteadElastica\Processor\Lowercase -> use Elastica\Processor\LowercaseProcessor insteadElastica\Processor\Remove -> use Elastica\Processor\RemoveProcessor insteadElastica\Processor\Rename -> use Elastica\Processor\RenameProcessor insteadElastica\Processor\Set -> use Elastica\Processor\SetProcessor insteadElastica\Processor\Sort -> use Elastica\Processor\SortProcessor insteadElastica\Processor\Split -> use Elastica\Processor\SplitProcessor insteadElastica\Processor\Trim -> use Elastica\Processor\AppendProcessor insteadElastica\Processor\Uppercase -> use Elastica\Processor\UppercaseProcessor insteadElastica\Query\Common -> use Elastica\Query\MatchQuery insteadElastica\QueryBuilder\DSL\Query::common_terms() -> use Elastica\QueryBuilder\DSL\Query::match() insteadElastica\Transport\HttpAdapter -> use Elastica\Transport\Http insteadElastica\Aggregation\Range::setKeyedResponse() -> use Elastica\Aggregation\Range::setKeyed() insteadElastica\Bulk::toString() -> use Elastica\Bulk::__toString() or cast to string insteadElastica\Query\MatchQuery::setFieldCutoffFrequency()Elastica\Query\MultiMatch::setCutoffFrequency()Elastica\QueryBuilder\DSL\Aggregation::global_agg() -> use Elastica\QueryBuilder\DSL\Aggregation::global() insteadElastica\Request::toString() -> use Elastica\Request::__toString() or cast to string insteadElastica\Result::getType()Elastica\Suggest\Phrase::addCandidateGenerator() -> use Elastica\Suggest\Phrase::addDirectGenerator() insteadElastica\Util::getParamName()Elastica\Aggregation\AvgBucket: The second argument $bucketsPath is now mandatoryElastica\Aggregation\BucketScript: The second (array $bucketsPath) and the third (string $script) argument are now mandatoryElastica\Aggregation\BucketSelector: The second (array $bucketsPath) and the third (string $script) argument are now mandatoryElastica\Aggregation\Derivative: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\NormalizeAggregation: The second (string $bucketsPath) and the third (string $method) argument are now mandatoryElastica\Aggregation\PercentilesBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\SerialDiff: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\StatsBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Aggregation\SumBucket: The second argument (string $bucketsPath) is now mandatoryElastica\Cluster\Health::getActiveShardsPercentAsNumber() method to float #2144$origin and $scale parameter types of Elastica\Query\FunctionScore::addDecayFunction() to allow float|int|string #2144$key parameter type of Elastica\Multi\Search::addSearch() to allow int|string|null #2144$options parameter type of Elastica\Index::create() to only allow array<string, mixed> #2147Elastica\Reindex::setWaitForCompletion() to only allow bool #2151Elastica\Search::addIndex(), Elasica\Search::addIndices() and Elastica\Search::hasIndex() parameter type to only allow Elastica\Index #2150$options argument to not accept int in the following methods #2148
Elastica\SearchableInterface::search()Elastica\SearchableInterface::createSearch()Elastica\Search::search()Elastica\Search::createSearch()Elastica\Search::setOptionsAndQuery()Elastica\Index::search()Elastica\Index::createSearch()Elastica\ConnectionElastica\Connection\ConnectionPoolElastica\Connection\Strategy\CallbackStrategyElastica\Connection\Strategy\RoundRobinElastica\Connection\Strategy\SimpleElastica\Connection\Strategy\StrategyFactoryElastica\Connection\Strategy\StrategyInterfaceElastica\Client::setLogger() method #2148strict_types on all classes #2190Elastica\Scroll:clear to use scroll_id body parameter instead of url parameter #2211[@throws](https://github.com/throws) annotations to Client::request and related methods #2152retry_on_conflict from Client configuration in Bulk updates (ported from 7.x #2184)php-cs-fixer to 3.13.2 #2143match expression #2141nyholm/dsn as no longer needed.symfony/deprecation-contracts as no longer needed.Elastica\Query to work with psalm & expand the aggs type to include raw arraysramsey/composer-install to simplify CI jobs and test with the lowest set of dependencies #2113elasticsearch/elasticsearch to 7.10 to be able to use OpenPointInTime class #2113php-cs-fixer to 3.9.5 #2110Elastica\Index\Settings::get adding ability to get default settings by @krasilnikovm #2115AWSAuthV4 transport to sanitize host name for AWS requests before signing #2090Elastica\Aggregation\Terms::setMissingBucket. For Composite Agg. Include in the response documents without a value for a given source. #2117PHPStan level to 5 by @franmomu #2108CallbackStrategyTestHelper and ErrorsCollector from tests #2111Query/Terms terms phpdoc from array<bool|float|int|string> to list<bool|float|int|string> #2118Response to prevent throwing JSONParseException when the response is empty.SetProcessor::setValue signature to allow to pass any type, if you are overriding this method you must update the signature removing the string type-hint by @franmomu #2082Settings::setMergePolicy signature to allow to pass int and string as argument 2, if you are overriding this method you must update the signature removing the string type-hint by @franmomu #2085PHPStan at level 3 by @franmomu #2064string as a valid type for data in Request by @franmomu #2078throws PHPDoc tags by @franmomu #2077Search::addIndexByName(), Search::hasIndexByName() and Search::addIndicesByName() by @franmomu #2103symfony/phpunit-bridge to 6.0 by @franmomu #2067php-cs-fixer to 3.8.0 #2074composer-normalize to 2.2.28 by @deguif #2084PHPStan level to 4 #2080ExceptionInterface extends Throwable #2083value in SetProcessor to accept mixed instead of string by @franmomu #2082Query::create PHPDoc to include supported types and propagate it to callers by @franmomu #2088AwsAuthV4Test adding assertions for exception type by @franmomu #2094Elastica\Reindex::WAIT_FOR_COMPLETION_FALSE, use a boolean as parameter instead by @franmomu #2070Reindex::setWaitForCompletion, pass a boolean instead by @franmomu #2070string as 1st argument to Search::addIndex() and Search::hasIndex(), pass an Index instance instead by @franmomu #2103string as 1st argument to Search::addIndices(), use an array of Index instances by @franmomu #2103egeloen/http-adapter as suggested package since the project is abandoned by @franmomu #20690 as valid request data using Analyze API by @franmomu #2068AwsAuthV4Test by @franmomu #2073null as possible value by @franmomu #2070 and #2087GapPolicyInterface::setGapPolicy(), Document::setDocAsUpsert() and Connection::setPort() methods by @franmomu #2081Http PHPDoc adding \CurlHandle type for Curl connection by @franmomu #2086MoreLikeThis::setLike() PHPDoc allowing Document by @franmomu #2091Term::setTerm() PHPDoc allowing scalar values for $value parameter by @franmomu #2094DateHistogram deprecation: use fixed_interval or calendar_interval instead of interval by @VincentLanglet #2099symfony/deprecation-contracts 3.0 by @rguennichi #2047auto_date_histogram @andriinavrotskii #2051Elastica\Aggregation\CumulativeSum by @limenet #1987ignore_failure option to suitable ingest processors by @deguif #2003ignore_missing option to lowercase, remove, trim and uppercase processors by @deguif #2001allow_duplicates option to append processor by @deguif #2004bytes processor by @deguif #2008indices_boost option to Elastica\Query by @deguif #2018Elastica\Query\Terms::setBoost() method to configure boost by @deguif #2035Elastica\Query\TermsSet query by @mamchyts #2020terms_set in query builder by @deguif #2036Elastica\Aggregation\Traits\BucketsPathTrait to configure buckets_path on aggregations by @deguif
#2037
#2039Elastica\Param::addParam() by @deguif #2030Elastica\Result::getType() method by @deguif #2016php-cs-fixer to 3.3.2 by @deguif #2022composer-normalize to 2.15.0 by @deguif #2021elasticsearch test version to 7.15.2 by @deguif #2027\Elastica\Aggregation\Traits\GapPolicyTrait and introduced \Elastica\Aggregation\GapPolicyInterface with constants for options by @stchr #2023field to Elastica\Processor\Traits\FieldTrait by @deguif #2024target_field to Elastica\Processor\Traits\TargetFieldTrait by @deguif #2026Elastica\Query\Common class, use Elastica\Query\MatchQuery instead by @deguif #2013Elastica\QueryBuilder\DSL\Query::common_terms(), use match() instead by @deguif #2013int as 1st argument to Elastica\Search::setOptionsAndQuery(), pass an array with the key size instead by @deguif #2010cutoff_frequency option of Elastica\Query\MatchQuery by @deguif #2014cutoff_frequency option of Elastica\Query\MultiMatch by @deguif #2015Elastica\Bulk::toString(), Elastica\Bulk\Action::toString() and Elastica\Request::toString() methods, use __toString() method or cast to string instead by @deguif #2033buckets_path when constructing Elastica\Aggregation\AvgBucket, Elastica\Aggregation\Derivative, Elastica\Aggregation\NormalizeAggregation, Elastica\Aggregation\PercentilesBucket, Elastica\Aggregation\SerialDiff, Elastica\Aggregation\StatsBucket and Elastica\Aggregation\SumBucket by @deguif #2038method when constructing Elastica\Aggregation\NormalizeAggregation by @deguif #2040_type field usages by @deguif #2017Elastica\Bulk::$_type dead property by @deguif #2034Elastica\Exception\JSONParseException inheritance, it now extends \JsonException instead of \RuntimeException #1949Elastica\Aggregation\NormalizeAggregation #1956Elastica\Suggest\Phrase::addDirectGenerator to align with ES specification #1964psr/log 2.0 and 3.0 #1971Elastica\Query\Wildcard #1894Elastica\Result::getSort() fetching the "sort" property of results #1979Elastica\ResultSet::getPointInTimeId() #1991Elastica\Index::openPointInTime() for opening a PiT on the index #1994Elastica\Query::setPointInTime() #1992Elastica\Client::closePointInTime() for closing a PiT #1995php-cs-fixer to 3.2.1
#1996
#1959
#1955Elastica\Query\MatchQuery::setFieldParam() signature to allow passing bool, float or int #1941Elastica\Query\MatchPhraseQuery::setFieldParam() signature to allow passing bool, float or int #1944docker directory in .gitattributes #1938Content-Type HTTP header every time, whatever the content of the body is #1780Elastica\Status::indexExists(), Elastica\Status::aliasExists() and Elastica\Status::getIndicesWithAlias() signatures #1929call_user_func() and call_user_func_array() by direct calls #1923CURLINFO_HTTP_CODE by CURLINFO_RESPONSE_CODE #1931php-cs-fixer to 2.18.3 #1915composer-normalize to 2.13.3 #1927Elastica\Transport\HttpAdapter class #1940Elastica\Exception\JSONParseException exception, catch \JsonException instead #1949ltrim usage in guzzle transport #1783_seq_no and _primary_term wrong initialization #1920Elastica\Connection\StrategyInterface instance checks #1921int in Elastica\Status::getIndexNames() #1928post_filter #1950Elastica\Aggregation\Range::setKeyed() and Elastica\Aggregation\PercentilesBucket::setKeyed() #1876Elastica\Aggregation\Percentiles::setMissing() argument #1875auth_type parameter in the client class config to specify the type of authentication (allowed values are basic, digest, gssnegotiate, ntlm) #1790if_seq_no / if_primary_term to replace version for optimistic concurrency control #1803Elastica\Aggregation\PercentilesBucket aggregation #1806weighted_avg to aggregations DSL #1814pool(http://127.0.0.1 http://127.0.0.2/bar?timeout=4) #1808Elastica\Aggregation\Composite aggregation #1804symfony/deprecation-contracts package to handle deprecations #1823list_syntax CS rule #1854native_constant_invocation CS rule #1833static_lambda CS rule #1870Elastica\Aggregation\DateRange::setTimezone() #1847Elastica\Index::create() #1859Elastica\Aggregation\DateHistogram::setKeyed() #1876Elastica\Aggregation\GeoDistance::setKeyed() #1876Elastica\Aggregation\Histogram::setKeyed() #1876Elastica\Aggregation\IpRange::setKeyed() #1876Elastica\Aggregation\GeotileGridAggregation #1880Elastica\Aggregation\Avg::setMissing(), Elastica\Aggregation\Cardinality::setMissing(), Elastica\Aggregation\DateRange::setMissing(), Elastica\Aggregation\DateHistogram::setMissing(), Elastica\Aggregation\ExtendedStats::setMissing(), Elastica\Aggregation\Histogram::setMissing(), Elastica\Aggregation\Max::setMissing(), Elastica\Aggregation\Min::setMissing(), Elastica\Aggregation\Stats::setMissing(), Elastica\Aggregation\Sum::setMissing(), Elastica\Aggregation\Terms::setMissing() #1876guzzlehttp/guzzle 7.x #1816elasticsearch/elasticsearch version 7.4.0 #1864string such as wait_for to be passed to AbstractUpdateAction::setRefresh #1791AbstractUpdateAction::getRefresh to boolean|string #1791Elastica\Index::create() #1822exceptions request option by http_errors request option in Guzzle transport #1817php-cs-fixer to 2.16.4 #1830php-cs-fixer to 2.16.7 #1881php-cs-fixer to 2.17.3 #1895php-cs-fixer to 2.18.2 #1897GuzzleHttp\RequestOptions constants for configuring request options #1820Elastica\Aggregation\Range::setKeyedResponse(), use setKeyed() instead #1848Elastica\Exception\ResponseException::getElasticsearchException(), use getResponse()::getFullError() instead #1829Elastica\QueryBuilder\DSL\Aggregation::global_agg(), use global() instead #1826Elastica\Util::getParamName() #1832version/version_type options (deprecated in 6.7.0) and added if_seq_no / if_primary_term that replaced itbool or null as 2nd argument to Elastica\Index::create() #1828Elastica\QueryBuilder\DSL\Aggregation::sampler() not consistent with the underlying constructor call #1815Elastica\Util::toSnakeCase() with first letter being lower cased #1831Elastica\Aggregation\GeohashGrid::setPrecision() #1884Elastica\Aggregation\Composite::addAfter() with the null value 1877_routing and _retry_on_conflict by routing and retry_on_conflict in AbstractUpdateAction #1807lib/Elastica/ to src/.Wildcard::setValue() changed its signature: use it to set the value of the wildcard query only.Wildcard Query's constructor now requires the name and value properties.Terms Query's constructor now requires the field and terms properties.AbstractTermsAggregation::setIncludeAsExactMatch() #1766AbstractTermsAggregation::setExcludeAsExactMatch() #1766AbstractTermsAggregation::setIncludeWithPartitions() #1766Elastica\Reindex->setPipeline(Elastica\Pipeline $pipeline): void. The link between the reindex and the pipeline is solved when run() is called, and thus the pipeline given doesn't need to be created before calling setPipeline() #1752Elastica\Reindex->setRefresh(string $value): void. It accepts REFRESH_* constants from its class #1752 and #1758Elastica\Reindex->setQuery(Elastica\Query\AbstractQuery $query): void #1752PIPELINE, REFRESH_TRUE, REFRESH_FALSE, REFRESH_WAIT_FOR, SLICES and SLICES_AUTO to Elastica\Reindex #1752Elastica\Pipeline->getId(): ?string #1752Elastica\Aggregation\ExtendedStatsBucket aggregation #1756Terms::setTerms() signature: it now accepts a list of strings only #1765Terms::setTermsLookup() signature: index, path and id are now required arguments #1765Wildcard::setValue() and constructor's signature: added more specific Wildcard::setBoost() and Wildcard::setRewrite methodssrc/ and tests/ folders #1755current() on an invalid iteration: always call valid() before
accessing the current item, as documented in PHP's Iterator documentation #1749DiversifiedSampler aggregation #1735\Elastica\Query\DistanceFeature #1730Index::deleteById() does not throw an NotFoundException when deleting a non-existing document #1732\Elastica\QueryBuilder\Version\Version240 has been moved to \Elastica\QueryBuilder\Version\Version700 #1693\Elastica\Suggest\Term deprecated option prefix_len to prefix_length #1707\Elastica\Query\GeoPolygon::count() method now returns the count of points passed to the filter #1696\Elastica\Client::request() which causes request data to not be sent to the logger #1682geo_bounding_box, geo_polygon, match_phrase, match_phrase_prefix, match_none to \Elastica\QueryBuilder\Version\Version700 #1702\Elastica\ResultSet::getTotalHitsRelation() to get relation for total hits #1694Sampler aggregation #1688\Elastica\Type\Mapping has been moved to \Elastica\Mapping #1666\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)). #1677BucketSelector aggregation #1554DerivativeAggregation #1553typed_keys support for Search queries #1603The changelog before version 2.0.0 was organised by date. All changes can be found below.
2015-02-17
2015-02-04
2015-02-16
2015-02-14
2015-02-11
2015-01-27
2015-01-25
2015-01-23
2015-01-19
2015-01-14
2015-01-07
2015-01-05
2014-12-30
2014-12-23
2014-12-19
weight in the function score query #7352014-12-09
2014-11-23
2014-12-14
2014-11-30
2014-11-20
2014-11-19
2014-11-16
2014-11-13
2014-10-31
2014-10-29
2014-10-22
2014-10-15
2014-10-10
2014-10-05
2014-10-04
2014-09-22
2014-09-16
2014-09-08
2014-08-25
2014-08-22
2014-08-06
2014-07-26
2014-07-25
2014-07-14
2014-07-12
2014-07-07
2014-07-02
2014-06-30
2014-06-14
2014-06-13
2014-06-11
2014-06-10
2014-06-04
2014-06-02
2014-06-01
2014-05-27
2014-05-25
2014-05-13
2014-05-12
2014-05-11
2014-05-05
2014-04-28
2014-04-27
2014-04-24
2014-04-22
2014-04-21
2014-04-20
2014-04-19
2014-04-17
2014-04-09
2014-04-07
2014-03-29
2014-03-26
2014-03-24
2014-03-25
2014-03-20
2014-03-17
2014-03-15
2014-03-14
2014-03-13
2014-03-11
2014-03-08
2014-03-07
2014-03-04
2014-03-02
2014-02-27
2014-02-25
2014-02-20
2014-02-17
2014-02-14
2014-02-13
2014-02-12
2014-02-11
2014-02-08
2014-02-04
2014-01-06
2014-01-02
2014-01-02
2014-01-31
2014-01-28
2014-01-22
2014-01-21
2014-01-17
2014-01-13
2014-01-14
2014-01-13
2014-01-08
2014-01-07
2013-12-18
2013-12-15
2013-12-12
2013-12-11
2013-12-07
2013-12-07
2013-12-05
2013-12-04
2013-12-02
2013-12-01
2013-11-30
2013-11-23
2013-11-19
2013-11-18
2013-11-16
2013-11-03
2013-10-29
2013-10-27
2013-10-27
2013-10-26
2013-10-21
2013-10-01
2013-09-20
2013-09-18
2013-09-17
2013-09-14
2013-09-03
2013-08-27
2013-08-25
2013-08-25
2013-08-20
2013-08-17
2013-08-13
2013-08-01
2013-07-16
2013-07-02
2013-07-01
2013-06-30
2013-06-29
2013-06-25
2013-06-23
2013-06-21
2013-06-14
2013-06-07
2013-06-05
2013-06-04
2013-06-03
2013-05-30
2013-05-29
2013-05-27
2013-05-23
2013-05-18
2013-05-07
2013-04-23
2013-04-17
2013-04-12
2013-03-20
2013-02-25
2013-02-20
2013-02-14
2013-02-08
2013-01-31
2013-01-25
2013-01-24
2013-01-21
2013-01-13
2012-12-23
2012-11-28
2012-11-23
2012-11-10
2012-10-30
2012-10-28
2012-08-11
2012-07-26
2012-07-17
2012-06-24
2012-06-22
2012-06-20
2012-06-09
2012-05-01
2012-03-04
2012-02-21
2012-01-23
2012-01-15
2012-01-08
2012-01-04
2012-01-01
2011-12-29
2011-12-20
2011-12-19
2011-12-06
2011-12-02
2011-12-01
2011-11-30
2011-11-28
2011-11-26
2011-11-20
2011-11-17
2011-11-07
2011-11-05
2011-10-29
2011-10-28
2011-10-20
2011-10-19
2011-10-15
2011-10-10
2011-09-19
2011-09-18
2011-08-25
2011-08-22
2011-08-15
2011-08-09
2011-08-08
2011-08-07
2011-08-05
2011-08-04
2011-07-30
2011-07-29
2011-07-22
2011-07-21
2011-07-20
2011-07-19
2011-07-18
2011-07-15
2011-06-19
2011-06-16
2011-06-07
2011-05-11
2011-05-08
2011-04-29
2011-04-28
2011-04-27
2011-04-17
2011-04-14
2011-04-01
2011-03-31
2011-03-30
2011-03-29
2011-03-24
2011-03-21
2011-03-13
2011-03-21
\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|falseElastica\Query\FunctionScore::addRandomScoreFunction #1529string_distance option in Term Suggestion #1543Using Elastica\Query\FunctionScore::addRandomScoreFunction without $field parameter is deprecated since ES 6.0 and will fail since ES 7.0 #1522
Aggreation\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
"compression" : 200,
"method" : "hdr",
"number_of_significant_value_digits" : 3
Now
"tdigest": {
"compression" : 200
},
"hdr": {
"number_of_significant_value_digits" : 3
}
Never implemented the method Missing on Aggregation\Percentiles #1532
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(). #1427optimize 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 #1319Scroll for closing search context on ES manuallyScrollQuery\NumericRange, use Query\Range instead #1334scroll_id inside a json body instead of plain text #1325\Elastica\Query\Span* for proximity searches #304Elastica\Search::OPTION_SEARCH_TYPE_DFS_QUERY_AND_FETCH and Elastica\Search::OPTION_SEARCH_TYPE_QUERY_AND_FETCH as no longer supported as of 5.3.0filter_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\FiltersTool\CrossIndex use \Elastica\Reindex instead #1311\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. #1251\Elastica\Script\AbstractScript added the script language as constructor argument and sub-classes must implement getScriptTypeArrayttl 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\Type::exists from the deprecated /{index}/{type} endpoint to /{index}/_mapping/{type}\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.Health::getIndices returns key=>value result, where key === $indexName.$cluster->getHealth()->getIndices()[$indexName]
// or
$indices = $cluster->getHealth()->getIndices();
$indices[$indexName]
Query::setTrackScores method\Elastica\JSON throws exception with readable message instead of errno\Elastica\JSON::stringify throws \Elastica\Exception\JSONParseException on errorint type hinting in setMinimumMatch (Terms Query): it should also allow string. #1151Query::addScriptField() if scripts were already set via setScriptFields() #1086Type in Query\Ids #1104\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 #1077Elastica\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/960score_method average to avg #975json_decode() assoc parameter to true in Elastica\Response #1005bigintConversion to keys passed to connection config in Elastica\Client #1005AUTO with the const MultiMatch::FUZZINESS_AUTOmake tests #901CallbackStrategy now will accept any callable as callback, not only instance of Closure. #871StrategyFactory now will try to find predefined strategy before looking to global namespace. #877QueryBuilder\DSL namespace now have exact same signatures as corresponding constructors. #878Aggregation\Filter now accepts filter as second parameter #878Filter\AbstractMulti (BoolAnd, BooldOr) now accepts array of filters as parameter #878Query\Match now accepts arguments #878Tool\CrossIndex for reindexing and copying data and mapping between indices #853Elastica\ScanAndScroll::$_lastScrollId removed: key() now always returns the next scroll id #842How can I help you explore Laravel packages today?