Skip to content

Releases: elastic/elasticsearch-py

8.2.0

03 May 19:58
Compare
Choose a tag to compare

Client

  • Re-introduced support for passing requests.auth.BaseAuth objects to the http_auth parameter which was available in 7.x.

Search

  • Added the filter parameter to the experimental knn_search API

Documents

  • Changed the source and dest parameters for the reindex API from optional to required

Indices

  • Added the indices.field_usage_stats API
  • Added the indices.modify_data_stream API
  • Added the fields and types parameters to the field_caps API
  • Added the ignore_unvailable parameter to the open_point_in_time API
  • Added the master_timeout and timeout parameters to the indices.delete API
  • Added the features parameter to the indices.get API

Machine Learning

  • Added the ml.get_memory_stats API

Migrations

  • Added the migrations.get_feature_upgrade_status API
  • Added the migrations.post_feature_upgrade API

Nodes

  • Added the nodes.clear_repositories_metering_archive API
  • Added the nodes.get_repositories_metering_info API

Security

  • Added the beta security.activate_user_profile API
  • Added the beta security.disable_user_profile API
  • Added the beta security.enable_user_profile API
  • Added the beta security.get_user_profile API
  • Added the beta security.suggest_user_profiles API
  • Added the beta security.update_user_profile_data API

SQL

  • Added the catalog, index_using_frozen, keep_alive, keep_on_completion, runtime_mappings, and wait_for_completion_timeout parameters to the sql.query API

8.1.3

26 Apr 12:40
e83cd91
Compare
Choose a tag to compare

Client

  • Client is compatible with Elasticsearch 8.1.3

7.17.3

26 Apr 13:01
7fba608
Compare
Choose a tag to compare

Client

  • Client is compatible with Elasticsearch 7.17.3

8.1.2

31 Mar 18:25
a8e4a32
Compare
Choose a tag to compare

Client

  • Client is compatible with Elasticsearch 8.1.2

7.17.2

31 Mar 18:21
Compare
Choose a tag to compare

Client

  • Client is compatible with Elasticsearch 7.17.2

8.1.1

22 Mar 22:08
Compare
Choose a tag to compare

Documents

  • Changed the source and dest parameters of the reindex API to be required.

Mappings

  • Changed the fields parameter of the field_caps API to be required.

8.1.0

08 Mar 19:27
Compare
Choose a tag to compare

Transforms

  • Added the transform.reset_transform API

8.0.1

01 Mar 19:47
74aa9de
Compare
Choose a tag to compare

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 the indices.field_usage_stats API

SQL

  • Added the catalog, keep_alive, keep_on_completion, params, runtime_mappings, and wait_for_completion_timeout parameters to the sql.query API

7.17.1

28 Feb 17:19
ecd4d5e
Compare
Choose a tag to compare

Helpers

  • Fixed the from parameter to be rewritten to from_ when used with the scan and async_scan helpers (#1897)

Transport

  • Fixed AiohttpHttpConnection to not leak TLS connections when the socket isn't explicitly shutdown by the peer (#1919)

8.0.0

10 Feb 16:36
Compare
Choose a tag to compare

⚠️ v8.0.0 is a new major release and contains some breaking changes.
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 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, include_type_name, and copy_settings 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 indices.exist_type API
  • Removed the deprecated parameter copy_settings from the indices.shrink API
  • Deprecated the verbose parameter of the indices.segments 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

  • 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 the ml.delete_trained_model API
  • Removed the deprecated allow_no_jobs parameter from the ml.close_job 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

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