Skip to content

Releases: elastic/elasticsearch-py

8.0.0-beta2

03 Feb 21:21

Choose a tag to compare

8.0.0-beta2 Pre-release
Pre-release

Client

Added

  • Added the top-level .options() method to Elasticsearch and AsyncElasticsearch 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 to ApiError 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.g index(document={...}) instead of index(body={...})).
  • Changed responses to be objects with two properties, meta for response metadata (HTTP status, headers, node, etc) and body for a typed body.
  • Changed AsyncElasticsearch to always be available, regardless of whether aiohttp 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 (previously elasticsearch.exceptions.TransportError, now elastic_transport.TransportError) and one raised from the API layer
  • Changed the name of JSONSerializer to JsonSerializer 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 the elastic-transport package
  • Removed the default URL of http://localhost:9200 due to Elasticsearch 8.0 default configuration being https://localhost:9200.
    The client's connection to Elasticsearch now must be specified with scheme, host, and port or with the cloud_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 and params parameters on all APIs
  • Deprecated setting transport options http_auth, api_key, ignore, request_timeout, headers, and opaque_id
    All of these settings should instead be set via the .options() method
  • Deprecated the elasticsearch.transport and elasticsearch.client modules. These modules will be removed in a future version

API

  • Removed the doc_type and include_type_name parameters from many document and index APIs

CAT

  • Removed the deprecated local parameter from the cat.indices, cat.nodes, cat.shards API
  • Removed the deprecated allow_no_datafeeds parameter from the cat.ml_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the cat.ml_jobs API
  • Removed the deprecated size parameter from the cat.thread_pool API
  • Added the time parameter to the cat.thread_pool API

Documents

  • Removed the deprecated size parameter from the delete_by_query API
  • Removed the deprecated size parameter from the update_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 the indices.shrink API

License / X-Pack

  • Deprecated the accept_enterprise parameter of the license.get API
  • Deprecated the accept_enterprise parameter of the xpack.info API

Machine Learning

  • Removed the deprecated allow_no_jobs parameter from the ml.close_job API
  • Added the timeout parameter to the ml.delete_trained_model API
  • Removed the deprecated ml.find_text_structure API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeed_stats API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_job_stats API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_jobs API
  • Removed the deprecated allow_no_jobs parameter from the ml.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

01 Feb 17:06

Choose a tag to compare

Machine Learning

  • Added the ml.get_model_snapshot_upgrade_stats API
  • Added the body parameter to the ml.forecast and ml.open_job APIs

Transform

  • Added the timeout parameter to the transform.delete_transform, transform.preview_transform, transform.put_transform, transform.update_transform, and transform.upgrade_transform APIs

8.0.0-beta1

18 Jan 20:05

Choose a tag to compare

8.0.0-beta1 Pre-release
Pre-release

Client

Added

  • Added the top-level .options() method to Elasticsearch and AsyncElasticsearch 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 to ApiError 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.g index(document={...}) instead of index(body={...})).
  • Changed responses to be objects with two properties, meta for response metadata (HTTP status, headers, node, etc) and body for a typed body.
  • Changed AsyncElasticsearch to always be available, regardless of whether aiohttp 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 (previously elasticsearch.exceptions.TransportError, now elastic_transport.TransportError) and one raised from the API layer
  • Changed the name of JSONSerializer to JsonSerializer 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 the elastic-transport package
  • Removed the default URL of http://localhost:9200 due to Elasticsearch 8.0 default configuration being https://localhost:9200.
    The client's connection to Elasticsearch now must be specified with scheme, host, and port or with the cloud_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 and params parameters on all APIs
  • Deprecated setting transport options http_auth, api_key, ignore, request_timeout, headers, and opaque_id
    All of these settings should instead be set via the .options() method
  • Deprecated the elasticsearch.transport and elasticsearch.client modules. These modules will be removed in a future version

API

  • Removed the doc_type and include_type_name parameters from many document and index APIs

CAT

  • Removed the deprecated local parameter from the cat.indices, cat.nodes, cat.shards API
  • Removed the deprecated allow_no_datafeeds parameter from the cat.ml_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the cat.ml_jobs API
  • Removed the deprecated size parameter from the cat.thread_pool API
  • Added the time parameter to the cat.thread_pool API

Documents

  • Removed the deprecated size parameter from the delete_by_query API
  • Removed the deprecated size parameter from the update_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 the indices.shrink API

License / X-Pack

  • Deprecated the accept_enterprise parameter of the license.get API
  • Deprecated the accept_enterprise parameter of the xpack.info API

Machine Learning

  • Removed the deprecated allow_no_jobs parameter from the ml.close_job API
  • Added the timeout parameter to the ml.delete_trained_model API
  • Removed the deprecated ml.find_text_structure API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeed_stats API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_job_stats API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_jobs API
  • Removed the deprecated allow_no_jobs parameter from the ml.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

13 Jan 18:14
81606bf

Choose a tag to compare

Client

  • API is compatible with Elasticsearch 7.16.3

8.0.0-alpha4

04 Jan 22:59

Choose a tag to compare

8.0.0-alpha4 Pre-release
Pre-release

Client

Added

  • Added the top-level .options() method to Elasticsearch and AsyncElasticsearch 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 to ApiError 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.g index(document={...}) instead of index(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, and body for a typed body.
  • Changed AsyncElasticsearch to always be available, regardless of whether aiohttp 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 (previously elasticsearch.exceptions.TransportError, now elastic_transport.TransportError) and one raised from the API layer
  • Changed the name of JSONSerializer to JsonSerializer 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 the elastic-transport package
  • Removed the default URL of http://localhost:9200 due to Elasticsearch 8.0 default configuration being https://localhost:9200.
    The client's connection to Elasticsearch now must be specified with scheme, host, and port or with the cloud_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, and opaque_id
    All of these settings should instead be set via the .options() method
  • Deprecated the elasticsearch.transport and elasticsearch.client modules. These modules will be removed in a future version
  • Deprecated the body and params parameters on all APIs

API

  • Removed the doc_type and include_type_name parameters from many document and index APIs

CAT

  • Removed the deprecated local parameter from the cat.indices, cat.nodes, cat.shards API
  • Removed the deprecated allow_no_datafeeds parameter from the cat.ml_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the cat.ml_jobs API
  • Removed the deprecated size parameter from the cat.thread_pool API
  • Added the time parameter to the cat.thread_pool API

Documents

  • Removed the deprecated size parameter from the delete_by_query API
  • Removed the deprecated size parameter from the update_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 the indices.shrink API

License / X-Pack

  • Deprecated the accept_enterprise parameter of the license.get API
  • Deprecated the accept_enterprise parameter of the xpack.info API

Machine Learning

  • Removed the deprecated allow_no_jobs parameter from the ml.close_job API
  • Added the timeout parameter to the ml.delete_trained_model API
  • Removed the deprecated ml.find_text_structure API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeed_stats API
  • Removed the deprecated allow_no_datafeeds parameter from the ml.get_datafeeds API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_job_stats API
  • Removed the deprecated allow_no_jobs parameter from the ml.get_jobs API
  • Removed the deprecated allow_no_jobs parameter from the ml.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

27 Dec 16:34
88e4bcf

Choose a tag to compare

Client

  • API is compatible with Elasticsearch 7.16.2

7.16.1

13 Dec 19:16
7e33544

Choose a tag to compare

Client

  • API is compatible with Elasticsearch 7.16.1

Transport

  • Fixed an issue where the AIOHttpConnection wouldn't log query parameters for URLs.

7.16.0

07 Dec 17:49
b1023d7

Choose a tag to compare

Client

Deprecated

  • 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

  • Fixed an issue with unicode HTTP headers with the urllib3 HTTP client
  • Fixed an issue with the scan helper to always set the sort and scroll parameters

API

Search

  • Changed the keep_alive parameter of the open_point_in_time API to be required
    to reflect its required status within Elasticsearch
  • Added the track_total_hits parameter to the search_mvt API

Fleet

  • Changed the fleet.global_checkpoints API from experimental to stable
  • Added the fleet.search experimental API
  • Added the fleet.msearch experimental API

Indices

  • Added the indices.modify_data_stream API

Ingest

  • Added the if_version parameter to the ingest.put_pipeline API

Migration

  • Added the migration.get_feature_upgrade_status API
  • Added the migration.post_feature_upgrade API

Machine Learning

  • Added the defer_definition_decompression parameter to the ml.put_trained_model API

Transforms

  • Added the transform.upgrade_transforms API

7.15.2

10 Nov 16:50

Choose a tag to compare

Client

  • API is compatible with Elasticsearch 7.15.2

Nodes

  • Documented additional options the metric parameter of the nodes.info API.

7.15.1

14 Oct 16:15

Choose a tag to compare

Client

  • Fixed a performance regression in JSONSerializer.default() when numpy and pandas weren't installed.
  • Changed the DeprecationWarning for the body parameter to be a "removed in a future version" instead of "removed in 8.0" in line with the 8.0 roadmap.

API

Search

  • The index parameter of the open_point_in_time API is now required, was optional.