Releases: elastic/elasticsearch-py
Releases · elastic/elasticsearch-py
8.0.1
Client
- Fixed the
sort
parameter of multiple APIs to serialize in the query string when using the shorthand form
Indices
- Fixed the
index
parameter to be required for theindices.field_usage_stats
API
SQL
- Added the
catalog
,keep_alive
,keep_on_completion
,params
,runtime_mappings
, andwait_for_completion_timeout
parameters to thesql.query
API
7.17.1
8.0.0
For information on how migrate your application from v7.x to v8.0.0 you can read the migration guide here.
Client
Added
- 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
- 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
- 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
Deprecated
- 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
API
- Removed the
doc_type
,include_type_name
, andcopy_settings
parameters from many document and index APIs
CAT
- 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
- Removed the deprecated
size
parameter from thedelete_by_query
API - Removed the deprecated
size
parameter from theupdate_by_query
API
Indices
- 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
- Deprecated the
accept_enterprise
parameter of thelicense.get
API - Deprecated the
accept_enterprise
parameter of thexpack.info
API
Machine Learning
- 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
- Added the experimental
knn_search
API
Searchable Snapshots
- Removed the deprecated
searchable_snapshots.repository_stats
API
Snapshots
- Changed the
snapshot.delete
API to accept multiple snapshots
Security
- Added the
security.enroll_kibana
API - Added the
security.enroll_node
API
8.0.0-beta2
Client
Added
- 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
- 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
- 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
Deprecated
- 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
API
- Removed the
doc_type
andinclude_type_name
parameters from many document and index APIs
CAT
- 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
- Removed the deprecated
size
parameter from thedelete_by_query
API - Removed the deprecated
size
parameter from theupdate_by_query
API
Indices
- 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 parameter
copy_settings
from theindices.shrink
API
License / X-Pack
- Deprecated the
accept_enterprise
parameter of thelicense.get
API - Deprecated the
accept_enterprise
parameter of thexpack.info
API
Machine Learning
- Removed the deprecated
allow_no_jobs
parameter from theml.close_job
API - Added the
timeout
parameter to theml.delete_trained_model
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 - 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
Search
- Added the experimental
knn_search
API
Searchable Snapshots
- Removed the deprecated
searchable_snapshots.repository_stats
API
Security
- Added the
security.enroll_kibana
API - Added the
security.enroll_node
API
7.17.0
Machine Learning
- Added the
ml.get_model_snapshot_upgrade_stats
API - Added the
body
parameter to theml.forecast
andml.open_job
APIs
Transform
- Added the
timeout
parameter to thetransform.delete_transform
,transform.preview_transform
,transform.put_transform
,transform.update_transform
, andtransform.upgrade_transform
APIs
8.0.0-beta1
Client
Added
- 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
- 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
Removed
- 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
Deprecated
- 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
API
- Removed the
doc_type
andinclude_type_name
parameters from many document and index APIs
CAT
- 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
- Removed the deprecated
size
parameter from thedelete_by_query
API - Removed the deprecated
size
parameter from theupdate_by_query
API
Indices
- 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 parameter
copy_settings
from theindices.shrink
API
License / X-Pack
- Deprecated the
accept_enterprise
parameter of thelicense.get
API - Deprecated the
accept_enterprise
parameter of thexpack.info
API
Machine Learning
- Removed the deprecated
allow_no_jobs
parameter from theml.close_job
API - Added the
timeout
parameter to theml.delete_trained_model
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 - 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
Search
- Added the experimental
knn_search
API
Searchable Snapshots
- Removed the deprecated
searchable_snapshots.repository_stats
API
Security
- Added the
security.enroll_kibana
API - Added the
security.enroll_node
API
7.16.3
Client
- API is compatible with Elasticsearch 7.16.3
8.0.0-alpha4
Client
Added
- 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
- 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={...} [elasticsearch8-8.0.0a3.tar.gz](https://github.com/elastic/elasticsearch-py/files/7686727/elasticsearch8-8.0.0a3.tar.gz) )
. - Changed responses to be objects with three properties,
meta
for response metadata,raw
for the raw deserialized response, 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
Removed
- 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
Deprecated
- 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 - Deprecated the
body
andparams
parameters on all APIs
API
- Removed the
doc_type
andinclude_type_name
parameters from many document and index APIs
CAT
- 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
- Removed the deprecated
size
parameter from thedelete_by_query
API - Removed the deprecated
size
parameter from theupdate_by_query
API
Indices
- 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 parameter
copy_settings
from theindices.shrink
API
License / X-Pack
- Deprecated the
accept_enterprise
parameter of thelicense.get
API - Deprecated the
accept_enterprise
parameter of thexpack.info
API
Machine Learning
- Removed the deprecated
allow_no_jobs
parameter from theml.close_job
API - Added the
timeout
parameter to theml.delete_trained_model
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 - 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
Search
- Added the experimental
knn_search
API
Searchable Snapshots
- Removed the deprecated
searchable_snapshots.repository_stats
API
Security
- Added the
security.enroll_kibana
API - Added the
security.enroll_node
API
7.16.2
Client
- API is compatible with Elasticsearch 7.16.2
7.16.1
Client
- API is compatible with Elasticsearch 7.16.1
Transport
- Fixed an issue where the
AIOHttpConnection
wouldn't log query parameters for URLs.