IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Release notes
editRelease notes
edit- 8.1.2 (2022-03-30)
- 8.1.1 (2022-03-22)
- 8.1.0 (2022-03-08)
- 8.0.0 (2022-02-10)
- 7.17.1 (2022-02-28)
- 7.17.0 (2022-02-01)
- 7.16.3 (2022-01-13)
- 7.16.2 (2021-12-27)
- 7.16.1 (2021-12-13)
- 7.16.0 (2021-12-07)
- 7.15.2 (2021-11-10)
- 7.15.1 (2021-10-14)
- 7.15.0 (2021-09-22)
- 7.14.0 (2021-08-02)
- 7.13.4 (2021-07-20)
- 7.13.3 (2021-07-07)
- 7.13.2 (2021-06-21)
- 7.13.1 (2021-06-02)
- 7.13.0 (2021-05-25)
- 7.12.1 (2021-04-27)
- 7.12.0 (2021-03-23)
- 7.11.0 (2021-02-10)
- 7.10.1 (2020-12-09)
- 7.10.0 (2020-11-11)
- 7.9.1 (2020-08-19)
- 7.9.0 (2020-08-18)
- 7.8.1 (2020-07-30)
- 7.8.0 (2020-06-18)
- 7.7.1 (2020-05-26)
- 7.7.0 (2020-05-13)
- 7.6.0 (2020-03-19)
- 7.5.1 (2020-01-19)
- 7.1.0 (2019-11-14)
- 7.0.5 (2019-10-01)
- 7.0.4 (2019-08-22)
- 7.0.3 (2019-08-21)
- 7.0.2 (2019-05-29)
- 7.0.1 (2019-05-19)
- 7.0.0 (2019-04-11)
8.1.2 (2022-03-30)
edit- Client is compatible with Elasticsearch 8.1.2
8.1.1 (2022-03-22)
editDocuments
edit-
Changed the
source
anddest
parameters of thereindex
API to be required.
Mappings
edit-
Changed the
fields
parameter of thefield_caps
API to be required.
8.1.0 (2022-03-08)
editTransforms
edit-
Added the
transform.reset_transform
API
8.0.0 (2022-02-10)
editAdded
edit-
Added the top-level
.options()
method toElasticsearch
andAsyncElasticsearch
for modifying transport options. - Added parameters corresponding to JSON request body fields for all APIs
-
Added
basic_auth
parameter for specifying username and password authentication -
Added
bearer_auth
parameter for specifying an HTTP bearer token or service token -
Added the
meta
property toApiError
to access the HTTP response metadata of an error. -
Added a check that a compatible version of the
elastic-transport
package is installed.
Changed
edit-
Changed the transport layer to use the
elastic-transport
package -
Changed user-defined
body
parameters to have semantic names (e.gindex(document={...})
instead ofindex(body={...})
). -
Changed responses to be objects with two properties,
meta
for response metadata (HTTP status, headers, node, etc) andbody
for a typed body. -
Changed
AsyncElasticsearch
to always be available, regardless of whetheraiohttp
is installed -
Changed exception hierarchy, the major change is a new exception
ApiError
which differentiates between an error that’s raised from the transport layer (previouslyelasticsearch.exceptions.TransportError
, nowelastic_transport.TransportError
) and one raised from the API layer -
Changed the name of
JSONSerializer
toJsonSerializer
for consistency with other serializer names. Added an alias to the old name for backwards compatibility -
Changed the default mimetypes (
application/json
) to instead use compatibility mimetypes (application/vnd.elasticsearch+json
) which always request for responses compatibility with version 8.x.
Removed
edit- Removed support for Python 2.7 and Python 3.5, the library now supports only Python 3.6+
-
Removed the
elasticsearch.connection
module as all functionality has been moved to theelastic-transport
package -
Removed the default URL of
http://localhost:9200
due to Elasticsearch 8.0 default configuration beinghttps://localhost:9200
. The client’s connection to Elasticsearch now must be specified with scheme, host, and port or with thecloud_id
parameter - Removed the ability to use positional arguments with API methods. Going forward all API parameters must be keyword-only parameters
-
Removed the
doc_type
,include_type_name
, andcopy_settings
parameters from many document and index APIs
Deprecated
edit-
Deprecated the
body
andparams
parameters on all APIs -
Deprecated setting transport options
http_auth
,api_key
,ignore
,request_timeout
,headers
, andopaque_id
All of these settings should instead be set via the.options()
method -
Deprecated the
elasticsearch.transport
andelasticsearch.client
modules. These modules will be removed in a future version
CAT
edit-
Removed the deprecated
local
parameter from thecat.indices
,cat.nodes
,cat.shards
API -
Removed the deprecated
allow_no_datafeeds
parameter from thecat.ml_datafeeds
API -
Removed the deprecated
allow_no_jobs
parameter from thecat.ml_jobs
API -
Removed the deprecated
size
parameter from thecat.thread_pool
API -
Added the
time
parameter to thecat.thread_pool
API
Documents
edit-
Removed the deprecated
size
parameter from thedelete_by_query
API -
Removed the deprecated
size
parameter from theupdate_by_query
API
Indices
edit-
Removed the deprecated
indices.flush_synced
API -
Removed the deprecated
indices.freeze
API -
Removed the deprecated
indices.get_upgrade
API -
Removed the deprecated
indices.upgrade
API -
Removed the deprecated
indices.exist_type
API -
Removed the deprecated parameter
copy_settings
from theindices.shrink
API -
Deprecated the
verbose
parameter of theindices.segments
API
License / X-Pack
edit-
Deprecated the
accept_enterprise
parameter of thelicense.get
API -
Deprecated the
accept_enterprise
parameter of thexpack.info
API
Machine Learning
edit-
Added the experimental
ml.infer_trained_model_deployment
API -
Added the experimental
ml.put_trained_model_definition_part
API -
Added the experimental
ml.put_trained_model_vocabulary
API -
Added the experimental
ml.start_trained_model_deployment
API -
Added the experimental
ml.stop_trained_model_deployment
API -
Added the
timeout
parameter to theml.delete_trained_model
API -
Removed the deprecated
allow_no_jobs
parameter from theml.close_job
API -
Removed the deprecated
ml.find_text_structure
API -
Removed the deprecated
allow_no_datafeeds
parameter from theml.get_datafeed_stats
API -
Removed the deprecated
allow_no_datafeeds
parameter from theml.get_datafeeds
API -
Removed the deprecated
allow_no_jobs
parameter from theml.get_job_stats
API -
Removed the deprecated
allow_no_jobs
parameter from theml.get_jobs
API -
Removed the deprecated
allow_no_jobs
parameter from theml.get_overall_buckets
API
Search
edit-
Added the experimental
knn_search
API
Searchable Snapshots
edit-
Removed the deprecated
searchable_snapshots.repository_stats
API
Snapshots
edit-
Changed the
snapshot.delete
API to accept multiple snapshots
Security
edit-
Added the
security.enroll_kibana
API -
Added the
security.enroll_node
API
7.17.1 (2022-02-28)
edit-
Fixed
AiohttpHttpConnection`
to not leak TLS connections when the socket isn’t explicitly shutdown by the peer -
Fixed the
from
parameter to be rewritten tofrom_
when used with thescan
andasync_scan
helpers
7.17.0 (2022-02-01)
edit- Client is compatible with Elasticsearch 7.17.0
7.16.3 (2022-01-13)
edit- Client is compatible with Elasticsearch 7.16.3
7.16.2 (2021-12-27)
edit- Client is compatible with Elasticsearch 7.16.2
7.16.1 (2021-12-13)
editFixed
edit-
Fixed issue where the
AIOHttpConnection
wouldn’t log query parameters for URLs.
7.16.0 (2021-12-07)
editDeprecated
edit-
Deprecated the
send_get_body_as
parameter. This parameter is no longer necessary as APIs all use non-GET HTTP methods when using a body. -
Removal of
body
,params
, and other per-request parameters has been delayed beyond 8.0.0. Changed deprecation warnings to mention "future version" instead of 8.0.0.
Fixed
edit-
Fixed an issue with
unicode
HTTP headers with the urllib3 HTTP client -
Fixed an issue with the
scan
helper to always set thesort
andscroll
parameters
Search
edit-
Changed the
keep_alive
parameter of theopen_point_in_time
API to be required to reflect its required status within Elasticsearch -
Added the
track_total_hits
parameter to thesearch_mvt
API
Fleet
edit-
Changed the
fleet.global_checkpoints
API from experimental to stable -
Added the
fleet.search
experimental API -
Added the
fleet.msearch
experimental API
Indices
edit-
Added the
indices.modify_data_stream
API
Ingest
edit-
Added the
if_version
parameter to theingest.put_pipeline
API
Migration
edit-
Added the
migration.get_feature_upgrade_status
API -
Added the
migration.post_feature_upgrade
API
Machine Learning
edit-
Added the
defer_definition_decompression
parameter to theml.put_trained_model
API
Transforms
edit-
Added the
transform.upgrade_transforms
API
7.15.2 (2021-11-10)
editNodes
edit-
Documented additional options the
metric
parameter of thenodes.info
API.
7.15.1 (2021-10-14)
editClient
edit-
Fixed a performance regression in
JSONSerializer.default()
whennumpy
andpandas
weren’t installed. -
Changed the
DeprecationWarning
for thebody
parameter to be a "removed in a future version" instead of "removed in 8.0" in line with the 8.0 roadmap.
Search
edit-
The
index
parameter of theopen_point_in_time
API is now required, was optional.
7.15.0 (2021-09-22)
editClient
edit- Added more precise type hints to many API parameters
-
Added explicit parameters to
AsyncTransport
andAIOHttpConnection
-
Added
MapboxVectorTileSerializer
for handling theapplication/vnd.mapbox-vector-tile
mimetype. Because this mimetype is binary rather than text the raw responsebytes
are forwarded from the serializer without decoding -
Reduced amount of time to import the
elasticsearch
module by delaying imports ofpandas
andnumpy
until later in the JSON serialization stage if necessary - Deprecated positional arguments for APIs, instead use keyword arguments exclusively.
Search
edit-
Added the
search_mvt
experimental API -
Added body field parameters to the
search
,scroll
, andclear_scroll
APIs -
Deprecated the
body
parameter of thesearch
,scroll
, andclear_scroll
APIs
Documents
edit-
Added body field parameters to the
update
API -
Added the
document
parameter to thecreate
andindex
APIs -
Deprecated the
body
parameter of thecreate
,index
, andupdate
APIs
Indices
edit-
Added the
indices.disk_usage
experimental API -
Added the
indices.fields_usage_stats
experimental API -
Added body field parameters to the
indices.create
API -
Deprecated the
body
parameter of theindices.create
API
Machine Learning
edit-
Added the
ignore_unavailable
,allow_no_indices
,ignore_throttled
, andexpand_wildcards
parameters to theml.put_job
API
Nodes
edit-
Added the
nodes.clear_repositories_metering_archive
experimental API -
Added the
nodes.get_repositories_metering_info
experimental API -
Added the
shards
option to theindex_metric
parameter of thenodes.stats
API -
Deprecated the
doc_type
parameter of thenodes.hot_threads
API, instead use thetype
parameterSecurity
edit -
Added the
security.query_api_keys
API
License
edit-
Deprecated the
doc_type
parameter of thelicense.post_start_trial
API, instead use thetype
parameter
7.14.0 (2021-08-02)
edit-
Added check that client is connected to an Elasticsearch cluster. If the client isn’t connected to a supported Elasticsearch cluster the
UnsupportedProductError
exception will be raised.
Search
edit-
Added the
terms_enum
beta API -
Removed the
query_and_fetch
anddfs_query_and_fetch
options in thesearch_type
parameter to themsearch
,msearch_template
andsearch_template
APIs
Index Lifecycle Management
edit-
Added the
ilm.migrate_to_data_tiers
API
Machine Learning
edit-
Added the
ml.reset_job
API
Security
edit-
Added the
security.saml_authenticate
API -
Added the
security.saml_complete_logout
API -
Added the
security.saml_invalidate
API -
Added the
security.saml_logout
API -
Added the
security.saml_prepare_authentication
API -
Added the
security.saml_service_provider_metadata
API
SQL
edit-
Added the
sql.delete_async
API -
Added the
sql.get_async
API -
Added the
sql.get_async_status
API
Snapshots
edit-
Added the
include_repository
parameter tosnapshot.get
API -
Added the
rarely_abort_writes
parameter to thesnapshot.repository_analyze
API
7.13.4 (2021-07-20)
edit- Client is compatible with Elasticsearch 7.13.4
7.13.3 (2021-07-07)
edit-
NameError
would be raised on Python 2.7 and 3.4 when a connection error would have otherwise been raised.
7.13.2 (2021-06-21)
edit-
Fixed
Transport.perform_request()
to properly reraiseRecursionError
-
Fixed
AIOHttpConnection
to no longer sendAccept-Encoding: gzip, deflate
whenhttp_compress=None
. Instead now sends noAccept-Encoding
header in the default case
Snapshot
edit-
Added the
snapshot.repository_analyze
API
7.13.1 (2021-06-02)
edit- Client is compatible with Elasticsearch 7.13.1
7.13.0 (2021-05-25)
edit-
Added support for compatibility header for Elasticsearch. If the environment variable
ELASTIC_CLIENT_APIVERSIONING=1
is set the client will send the headers Accept and Content-Type with the following value:application/vnd.elasticsearch+json;compatible-with=7
.
Cat
edit-
Added the
include_unloaded_segments
parameter to thecat.nodes
API -
Added the
features.reset_features
experimental API -
Added the
fleet.global_checkpoints
expiremental API -
Added the
ingest.geo_ip_stats
API
Machine Learning
edit-
Added the
ml.delete_trained_model_alias
API -
Added the
ml.preview_data_frame_analytics
API -
Added the
ml.put_trained_model_alias
API -
Changed the
ml.delete_data_frame_analytics
,ml.delete_trained_model
,ml.explain_data_frame_analytics
,ml.get_data_fram_analytics
,ml.get_data_frame_analytics_stats
,ml.get_trained_models
,ml.get_trained_models_stats
,ml.put_trained_model
,ml.start_data_frame_analytics
,ml.stop_data_frame_analytics
,ml.update_data_frame_analytics
APIs from beta to stable.
Nodes
edit-
Added
include_unloaded_segments
parameter tonode.stats
API
Searchable Snapshots
edit-
Added the
searchable_snapshots.cache_stats
experimental API
Security
edit-
Added the
security.clear_cached_service_tokens
beta API -
Added the
security.create_service_token
beta API -
Added the
security.delete_service_token
beta API -
Added the
security.get_service_accounts
beta API -
Added the
security.get_service_credentials
beta API
Shutdown
edit-
Added the
shutdown.delete_node
experiemental API -
Added the
shutdown.get_node
experimental API -
Added the
shutdown.put_node
experimental API
Snapshots
edit-
Added the
index_details
parameter tosnapshot.get
API
Text Structure
edit-
Changed the
text_structure.find_structure
API from experimental to stable
7.12.1 (2021-04-27)
editText Structure
edit-
Changed the
text_structure.find_text_structure
API from experimental to stable
7.12.0 (2021-03-23)
editAutoscaling
edit-
Changed
autoscaling.delete_autoscaling_policy
,autoscaling.get_autoscaling_policy
, andautoscaling.put_autoscaling_policy
APIs from experimental to stable
EQL
edit-
Added
eql.get_status
API
Logash
edit-
Added
logstash.delete_pipeline
,logstash.get_pipeline
, andlogstash.put_pipeline
APIs
Machine Learning
edit-
Removed the experimental
ml.find_text_structure
API
Searchable Snapshots
edit-
Added
storage
parameter to thesearchable_snapshots.mount
API -
Added
level
parameter to thesearchable_snapshots.stats
API
Search
edit-
Added the
min_compatible_shard_node
parameter tosearch()
Text Structure
edit-
Added experimental
text_structure.find_text_structure
API
7.11.0 (2021-02-10)
edit- Added support for 7.11 APIs.
-
Added the
X-Elastic-Client-Meta
HTTP header and themeta_header
parameter for controlling the header (#1473). -
Added
ElasticsearchWarning
which is raised when theWarning
HTTP header is returned from Elasticsearch.ElasticsearchDeprecationWarning
is now an alias for this warning type (#1495).
7.10.1 (2020-12-09)
edit-
Fixed issue where the Scan helper would fail if a
scroll
response returned without a value for_shards.skipped
(#1451). -
Fixed handling of IPv6 hosts with a port in the computed
Connection.host
property (#1460). - Fixed documented task management API stability, should have been as "experimental" (#1471).
-
Changed deprecated
collections.Mapping
in favor ofcollections.abc.Mapping
for Python 3.9 (#1443).
7.10.0 (2020-11-11)
edit- Added support for Elasticsearch 7.10 APIs.
- Added basic type stubs for static type checking and IDE auto-complete of API parameters (#1297, #1406).
-
Added support for
Optimistic Concurrency Control options
(_if_seq_no
/_if_primary_term
) to bulk helpers (#1387). -
Added support for passing
_source
with"_op_type": "update"
bulk helpers (#1387). -
Fixed bug where
Connection.log_request_failure()
call would receive the compressed HTTP body rather than uncompressed when an error is raised forRequestsHttpConnection
(#1394). -
Fix a typo in AsyncTransport where
sniff_timeout
was used instead ofsniffer_timeout
(#1431). -
Removed explicit
yarl
dependency from[async]
extra to avoid issue where pip would overrideaiohttp
's pin ofyarl
. This is not a problem if you install with--use-feature=2020-resolver
. Users should see no changes (#1401).
7.9.1 (2020-08-19)
edit7.9.0 (2020-08-18)
edit7.8.1 (2020-07-30)
edit-
Added the
accept_enterprise
parameter toxpack.info
API (#1337).
7.8.0 (2020-06-18)
edit- Added support for ES 7.8 APIs.
-
Added support for async/await with asyncio via
AsyncElasticsearch
. See documentation on `using Asyncio with Elasticsearch (#1232, #1235, #1236). -
Added async helpers
async_bulk
,async_streaming_bulk
,async_scan
, andasync_reindex
(#1260). -
Updated
exists_source
API to use non-deprecated Elasticsearch API routes whendoc_type
is not specified to suppress deprecation warnings (#1272).
7.7.1 (2020-05-26)
edit-
Updated
create
,update
,explain
,get_source
, andtermvectors
APIs to use non-deprecated Elasticsearch API routes whendoc_type
is not specified to suppress deprecation warnings (#1253).
7.7.0 (2020-05-13)
edit- Added support for ES 7.7 APIs (#1182).
-
Added
ElasticsearchDeprecationWarning
which is raised when aWarning
HTTP header is sent by Elasticsearch (#1179). -
Added support for serializing
numpy
andpandas
data types toJSONSerializer
(#1180). -
Added
certifi
as a dependency so HTTPS connections work automatically. - Fixed duplicated parameters in some API docstrings (#1169, thanks to Morten Hauberg).
7.6.0 (2020-03-19)
edit- Added support for ES 7.6 APIs.
-
Added support for
X-Opaque-Id
to identify long-running tasks. -
Added support for HTTP compression to
RequestsHttpConnection
. -
Updated default setting of
http_compress
when usingcloud_id
toTrue
. -
Updated default setting of
sniffing
when usingcloud_id
toFalse
. -
Updated default port to
443
ifcloud_id
and no other port is defined on the client or withincloud_id
. -
Updated
GET
HTTP requests that contain a body toPOST
where the API allows this to fix proxies rejecting these requests. -
Fix regression of
client.cluster.state()
where the defaultmetric
should be set to"_all"
if an index is given (#1143). -
Fix regression of
client.tasks.get()
without atask_id
having similar functionality toclient.tasks.list()
This will be removed inv8.0
ofelasticsearch-py
(#1157).
7.5.1 (2020-01-19)
edit- All API is now auto generated.
-
Deprecated the
.xpack
namespace. - Update client to support ES 7.5 APIs.
7.1.0 (2019-11-14)
edit-
Fix sniffing with
http.publish_host
. -
Fix
request_timeout
forindices
APIs. -
Allow access to
x-pack
features withoutxpack
namespace. - Fix mark dead.
7.0.5 (2019-10-01)
edit-
Fix
verify_certs=False
.
7.0.4 (2019-08-22)
edit- Fix wheel distribution.
7.0.3 (2019-08-21)
edit- Remove sleep in retries.
-
Pass
scroll_id
through body inscroll
. -
Add
user-agent
.
7.0.2 (2019-05-29)
edit- Add connection parameter for Elastic Cloud cloud_id.
- ML client uses client object for _bulk_body requests.
7.0.1 (2019-05-19)
edit- Use black to format the code.
- Update the test matrix to only use current pythons and 7.x ES.
- Blocking pool must fit thread_count.
- Update client to support missing ES 7 API’s and query params.
7.0.0 (2019-04-11)
edit-
Removed deprecated option
update_all_types
. -
Using insecure SSL configuration (
verify_cert=False
) raises a warning, this can be not showed withssl_show_warn=False
. - Add support for 7.x APIs in Elasticsearch both xpack and oss flavors.
- Ordering of parameters may have changed for some APIs compared to 6.8. Use keyword arguments instead of positional arguments to work-around this change.