Skip to content

Releases: elastic/elasticsearch-php

Release 9.1.0

06 Aug 12:58
v9.1.0
c963518
Compare
Choose a tag to compare

This version includes the API changes in Elasticsearch 9.1.0.

This release introduces 13 APIs and 3 experimental APIs.
Where specified, the APIs are availables on Elastic Cloud Serverless.

Specific changes per endpoints

Cluster.getComponentTemplate

  • Added flat_settings parameter (bool), return settings in flat format (default: false)
  • Added settings_filter parameter (string), filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys

Cluster.putComponentTemplate

  • Removed timeout parameter
  • Added cause parameter (string), user defined reason for create the component template

Eql.search

  • Added ccs_minimize_roundtrips parameter (bool), indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.

Esql.asyncQuery

  • Added allow_partial_results parameter (bool), if true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. If false, the entire query will fail if there are any failures.

Esql.asyncQueryGet

  • Added format parameter (string), a short version of the Accept header, e.g. json, yaml

Esql.getQuery (new EXPERIMENTAL API, available on serverless)

Esql.listQueries (new EXPERIMENTAL API, available on serverless)

Esql.query

  • Added allow_partial_results parameter (bool), if true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. If false, the entire query will fail if there are any failures.

Indices.deleteDataStreamOptions (new API)

Indices.getDataStreamOptions (new API, available on serverless)

Indices.getDataStreamSettings (new API, available on serverless)

Indices.getFieldMapping

  • Removed the local parameter.

Indices.putDataStreamOptions (new API, available on serverless)

Indices.putDataStreamSettings (new API, available on serverless)

Indices.recovery

  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.

Indices.removeBlock (new API, available on serverless)

Inference.putAmazonsagemaker (new API, available on serverless)

Inference.putCustom (new API, available on serverless)

Inference.putDeepseek (new API, available on serverless)

Snapshot.get

  • Added state parameter (string|array), filter snapshots by a comma-separated list of states. Valid state values are 'SUCCESS', 'IN_PROGRESS', 'FAILED', 'PARTIAL', or 'INCOMPATIBLE'.

Snapshot.repositoryAnalyze

  • Added register_operation_count parameter (int), the minimum number of linearizable register operations to perform in total. Defaults to 10.

Snapshot.repositoryVerifyIntegrity (new EXPERIMENTAL API)

Streams.logsDisable (new API)

Streams.logsEnable (new API)

Streams.status (new API)

Synonyms.deleteSynonymRule

  • Added refresh parameter (bool), refresh search analyzers to update synonyms

Synonyms.putSynonym

  • Added refresh parameter (bool), refresh search analyzers to update synonyms

Synonyms.putSynonymRule

  • Added refresh parameter (bool), refresh search analyzers to update synonyms

create

  • Added require_alias parameter (bool), when true, requires destination to be an alias. Default is false
  • Added require_data_stream parameter (bool), when true, requires destination to be a data stream (existing or to be created). Default is false

msearch

  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added ignore_throttled parameter (bool), whether specified concrete, expanded or aliased indices should be ignored when throttled
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.
  • Added routing parameter (string|array), a comma-separated list of specific routing values
  • Added include_named_queries_score parameter (bool), indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)

openPointInTime

  • Added max_concurrent_shard_requests parameter (int), the number of concurrent shard requests per node executed concurrently when opening this point-in-time. This value should be used to limit the impact of opening the point-in-time on the cluster

reindex

  • Added require_alias parameter (bool), when true, requires destination to be an alias.

searchMvt

  • Added grid_agg parameter (string), aggregation used to create a grid for field.

Release 8.19.0

06 Aug 17:10
v8.19.0
1771284
Compare
Choose a tag to compare

This version includes the API changes in Elasticsearch 8.19.0.

General changes

This release introduces 11 APIs and 2 experimental APIs.

Specific changes per endpoints

Cluster.getComponentTemplate

  • Added flat_settings parameter (bool), return settings in flat format (default: false)
  • Added settings_filter parameter (string), filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys

Cluster.putComponentTemplate

  • Removed timeout parameter
  • Added cause parameter (string), user defined reason for create the component template

Eql.search

  • Added ccs_minimize_roundtrips parameter (bool), indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.

Esql.asyncQuery

  • Added allow_partial_results parameter (bool), if true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. If false, the entire query will fail if there are any failures.

Esql.asyncQueryGet

  • Added format parameter (string), a short version of the Accept header, e.g. json, yaml

Esql.getQuery (new EXPERIMENTAL API)

Esql.listQueries (new EXPERIMENTAL API)

Esql.query

  • Added allow_partial_results parameter (bool), if true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. If false, the entire query will fail if there are any failures.

Ilm.deleteLifecycle

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ilm.explainLifecycle

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node

Ilm.getLifecycle

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ilm.putLifecycle

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ilm.start

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ilm.stop

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Indices.deleteDataStreamOptions (new API)

Indices.getDataStreamOptions (new API)

Indices.getDataStreamSettings (new API)

Indices.getFieldMapping

  • Removed the local parameter.

Indices.putDataStreamOptions (new API)

Indices.putDataStreamSettings (new API)

Indices.recovery

  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.

Inference.putAmazonsagemaker (new API)

Inference.putCustom (new API)

Inference.putDeepseek (new API)

Ingest.deleteGeoipDatabase

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ingest.deleteIpLocationDatabase

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ingest.putGeoipDatabase

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ingest.putIpLocationDatabase

  • Added master_timeout parameter (int|string), explicit operation timeout for connection to master node
  • Added timeout parameter (int|string), explicit operation timeout

Ml.stopDatafeed

  • Removed allow_no_datafeeds parameter

Snapshot.repositoryAnalyze

  • Added register_operation_count parameter (int), the minimum number of linearizable register operations to perform in total. Defaults to 10.

Streams.logsDisable (new API)

Streams.logsEnable (new API)

Streams.status (new API)

create

  • Added require_alias parameter (bool), when true, requires destination to be an alias. Default is false
  • Added require_data_stream parameter (bool), when true, requires destination to be a data stream (existing or to be created). Default is false

msearch

  • Added ignore_unavailable parameter (bool), whether specified concrete indices should be ignored when unavailable (missing or closed)
  • Added ignore_throttled parameter (bool), whether specified concrete, expanded or aliased indices should be ignored when throttled
  • Added allow_no_indices parameter (bool), whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)
  • Added expand_wildcards parameter (string), whether to expand wildcard expression to concrete indices that are open, closed or both.
  • Added routing parameter (string|array), a comma-separated list of specific routing values
  • Added include_named_queries_score parameter (bool), indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)

openPointInTime

  • Added max_concurrent_shard_requests parameter (int), the number of concurrent shard requests per node executed concurrently when opening this point-in-time. This value should be used to limit the impact of opening the point-in-time on the cluster

reindex

  • Added require_alias parameter (bool), when true, requires destination to be an alias.

searchMvt

  • Added grid_agg parameter (string), aggregation used to create a grid for field.

Release 7.17.3

14 Jul 09:23
v7.17.3
b8a60b4
Compare
Choose a tag to compare

This release contains the following fix:

  • Support for PHP 8.4 #1417

Release 8.18.0

02 May 11:27
v8.18.0
df8ee73
Compare
Choose a tag to compare

This version includes the API changes in Elasticsearch 8.18.0.

General changes

This release introduces 23 new APIs.

Specific changes per endpoints

bulk

  • Added the include_source_on_error parameter (boolean), true or false if to include the document source in the error message in case of parsing errors. Defaults to true.

create

  • Added the include_source_on_error parameter (boolean), true or false if to include the document source in the error message in case of parsing errors. Defaults to true.

index

  • Added the include_source_on_error parameter (boolean), true or false if to include the document source in the error message in case of parsing errors. Defaults to true.

update

  • Added the include_source_on_error parameter (boolean), true or false if to include the document source in the error message in case of parsing errors. Defaults to true.

Cat.segments

  • Added the local parameter (boolean), return local information, do not retrieve the state from master node (default: false)
  • Added the master_timeout parameter (int|string), explicit operation timeout for connection to master node

Cat.tasks

  • Added the timeout parameter (int|string), period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error
  • Added the wait_for_completion parameter (boolean), if true, the request blocks until the task has completed

Eql.search

  • Added the allow_partial_search_results parameter (boolean), control whether the query should keep running in case of shard failures, and return partial results
  • Added the allow_partial_sequence_results parameter (boolean), control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true

Esql.asyncQueryStop (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/esql.async_query_stop.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html

Indices.putTemplate

  • Added the cause parameter (string), user defined reason for creating/updating the index template

Indices.resolveCluster

  • The name parameter is not mandatory anymore
  • Added the timeout parameter (int|string), the maximum time to wait for remote clusters to respond

Inference.chatCompletionUnified (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.chat_completion_unified.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/chat-completion-inference.html

Inference.completion (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.completion.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html

Inference.delete

This endpoint is not EXPERIMENTAL anymore

Inference.get

This endpoint is not EXPERIMENTAL anymore

Inference.inference

This endpoint is not EXPERIMENTAL anymore

Inference.put

This endpoint is not EXPERIMENTAL anymore

Inference.putAlibabacloud (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_alibabacloud.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-alibabacloud-ai-search.html

Inference.putAmazonbedrock (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_amazonbedrock.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-bedrock.html

Inference.putAnthropic (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_anthropic.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-anthropic.html

Inference.putAzureaistudio (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_azureaistudio.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-ai-studio.html

Inference.putAzureopenai (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_azureopenai.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-azure-openai.html

Inference.putCohere (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_cohere.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-cohere.html

Inference.putElasticsearch (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_elasticsearch.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html

Inference.putElser (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_elser.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elser.html

Inference.putGoogleaistudio (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_googleaistudio.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-ai-studio.html

Inference.putGooglevertexai (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_googlevertexai.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-google-vertex-ai.html

Inference.putHuggingFace (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_hugging_face.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-hugging-face.html

Inference.putJinaai (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_jinaai.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-jinaai.html

Inference.putMistral (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_mistral.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-mistral.html

Inference.putOpenai (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_openai.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html

Inference.putVoyageai (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_voyageai.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html

Inference.putWatsonx (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_watsonx.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html

Inference.rerank (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.rerank.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html

Inference.sparseEmbedding (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.sparse_embedding.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html

Inference.streamCompletion (new API)

This endpoint replaces the Inference.streamInterface.
API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.stream_completion.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html

Inference.streamInferface

This endpoint has been removed

Inference.textEmbedding (new API)

API: https://github.com/elastic/elasticsearch/blob/v8.18.0/rest-api-spec/src/main/resources/rest-api-spec/api/inference.text_embedding.json
Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html

Release 9.0.0

18 Apr 08:15
v9.0.0
5aa8b17
Compare
Choose a tag to compare

This is the new major release of elasticsearch-php compatible with Elasticsearch 9.0.0 🎉

  • Compatibility with Elasticsearch 9.0: All changes and additions to Elasticsearch APIs for its 9.0 release are reflected in this release.
  • Serverless client merged in: the elastic/elasticsearch-serverless client is being deprecated, and its functionality has been merged back into this client. This should have zero impact on the way the client works by default. If an endpoint is available in serverless, the PHP function will contains a @group serverless phpdoc attribute.
    If you try to use an endpoint that is not available in serverless you will get a 410 HTTP error with a message as follows:
    "this endpoint exists but is not available when running in serverless mode".
    The 9.0.0 client can recognize that it is communicating with a serverless instance if you are using a URL managed by Elastic (e.g. *.elastic.cloud).
    If you are using a proxy, the client will be able to recognize that the host is serverless from the first response. Alternatively, you can explicitly indicate that the host is serverless using the Client::setServerless(true) function (false by default).
  • New transport library with PSR-18 cURL client as default: we've removed the Guzzle dependency from the client. By default, the built-in cURL-based HTTP client will be used if no other PSR-18 compatible clients are detected. See release 9.0.0 of elastic-transport-php.

Breaking changes

  • Use of PHP 8.1+: Starting from 9.0.0 the elasticsearch-php client requires PHP 8.1+.

Deprecations

  • Utility::urlencode(): this function has been deprecated in favor of rawurlencode() of PHP (see #1278).

Release 8.17.1

28 Mar 15:48
v8.17.1
10af1f4
Compare
Choose a tag to compare

This release contains the following fix:

  • Fix and improvements for PHPStan (rule level 5) #1442 (thanks @AJenbo)

Release 6.8.4

17 Mar 14:43
v6.8.4
3fd8172
Compare
Choose a tag to compare

This release fixes the following issues:

  • Upgrade ezimuel/ringphp to 1.3.0 to support React Promise v3 for Elasticsearch #1430
  • Fixed implicitly nullable parameters being deprecated in PHP 8.4 notice issue #1420

Thanks to @MaelitoP and @dakujem for these fixes.

Release 8.17.0

18 Dec 11:22
v8.17.0
6cd0fe6
Compare
Choose a tag to compare
  • Updated the APIs to Elasticsearch 8.17.0

Release 8.16.0

14 Nov 23:01
v8.16.0
ab0fdb4
Compare
Choose a tag to compare
  • Updated the APIs to Elasticsearch 8.16.0
  • Added the support of PHP 8.4 #1415 (thanks @ruudk)

Release 8.15.0

14 Aug 14:38
v8.15.0
34c2444
Compare
Choose a tag to compare
  • Updated the APIs to Elasticsearch 8.15.0
  • Added the support of OpenTelemetry

Read the elastic-transport-php README for more information about OpenTelemetry support.