unstale

npm / @elastic/elasticsearch

@elastic/elasticsearch

What changed in @elastic/elasticsearch 8 to 9, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

23 breaking1 deprecations10 new APIs and options1 performance4 behavior and defaults15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@elastic/elasticsearch 927 changes

Breaking changes 1

  • The minimum supported Node.js version is now 20; Node.js 18 reached end-of-life in April 2025.

    9.4.0release notes

Deprecations 1

  • Marked deprecated since Elasticsearch 9.5 because Lucene 10.4 computes it automatically.

    9.5.1release notes

New APIs and options 10

  • Specification types now include the columnar_stored source field mode.

    9.5.1release notes

  • Adds the missing auto_calibrate property for bbq_disk index options.

    9.5.1release notes

  • Adds the missing bits property for bbq_disk index options.

    9.5.1release notes

  • Adds the missing cluster_size property for bbq_disk index options.

    9.5.1release notes

  • Adds the missing precondition property for bbq_disk index options.

    9.5.1release notes

  • Adds a client option to reject requests before sending them when the path and query string exceed a configurable byte length.

    9.4.3release notesrelease notes

  • Accepts an onFlush callback called each time the bulk buffer is flushed, receiving the same stats object as onDrop.

    9.4.0release notes

  • Changes and additions to Elasticsearch APIs for 9.3 are reflected in the client.

    9.3.0release notes

  • The client supports importing directly from the elasticsearch package without a bundler like Webpack or Rollup.

    9.3.0release notes

  • Transport request metadata now includes the names of all parameters an API supports, helping custom transports make more flexible pre-flight request modifications.

    9.2.0release notes

Behavior and default changes 1

  • The package is an optional peer dependency and is only needed when using the ES|QL helpers that require it, reducing the dependency tree for other users.

    9.4.0release notes

Fixes and other changes 14

  • Adds the missing default_visit_percentage property for bbq_disk index options.

    9.5.1release notes

  • The normalizer field is now optional, so TypeScript accepts valid requests that omit it.

    9.5.1release notes

  • The weight field is now optional, so TypeScript accepts valid requests that omit it.

    9.5.1release notes

  • The num_candidates field is now optional, matching the server default introduced in Elasticsearch 9.5.

    9.5.1release notes

  • Changes and additions to Elasticsearch APIs for 9.5 are reflected in the client.

    9.5.0release notes

  • The bulk API only throws an error when operations is truly empty.

    9.4.2release notes

  • The bulk helper now throws errors properly when given a stream.

    9.4.1release notes

  • Changes and additions to Elasticsearch 9.4 APIs are reflected in the client release.

    9.4.0release notes

  • Server error responses are surfaced as a ResponseError instead of passing the raw error stream to Apache Arrow, avoiding a confusing parse failure.

    9.4.0release notes

  • acceptedParams now categorizes parameters as path, body, and query so consumers can determine where to inject parameters like project_routing.

    9.3.3release notes

  • Corrections and improvements to the Elasticsearch specification improve compatibility with Elasticsearch 9.3.

    9.3.1release notesrelease notes

  • Exported estypes for ESM-based projects and fixed ESM module compatibility with JavaScript bundlers.

    9.3.1release notes

  • Child clients with different auth options no longer share the authorization header from the first child.

    9.2.1release notes

  • Changes and additions to Elasticsearch APIs for its 9.2 release are reflected in this release.

    9.2.0release notes

@elastic/elasticsearch 827 changes

Breaking changes 22

  • Requests can be aborted using the standard AbortController API and a request signal.

    8.0.0upgrade guide

  • API calls return the response body instead of HTTP-related keys by default.

    8.0.0upgrade guide

  • Request parameters are no longer wrapped in a body key; pass them directly in the request object.

    8.0.0upgrade guide

  • The callback-style API is dropped in favor of the full-promise API.

    8.0.0upgrade guide

  • Camel-cased path and query parameter keys are no longer supported; use snake_case keys.

    8.0.0upgrade guide

  • The client extensions API is removed; use transport.request if necessary.

    8.0.0upgrade guide

  • Cloud configuration no longer accepts password; configure basic authentication in auth instead.

    8.0.0upgrade guide

  • Cloud configuration no longer accepts username; configure basic authentication in auth instead.

    8.0.0upgrade guide

  • The client exposes a diagnostic property that is a proper event emitter, replacing the emitter-like methods on the client.

    8.0.0upgrade guide

  • The policy parameter is renamed to name.

    8.0.0upgrade guide

  • The policy parameter is renamed to name.

    8.0.0upgrade guide

  • The policy parameter is renamed to name.

    8.0.0upgrade guide

  • Set the request-specific meta option to receive full response details, including the body, status code, headers, and warnings.

    8.0.0upgrade guide

  • Prototype poisoning protection is removed because it can cause performance issues with big payloads; the notes say documentation will show how to add it back with a custom serializer.

    8.0.0upgrade guide

  • Snake-cased client methods are no longer supported; use camelCased methods instead.

    8.0.0upgrade guide

  • The repository parameter is renamed to name.

    8.0.0upgrade guide

  • The repository parameter is renamed to name.

    8.0.0upgrade guide

  • The repository parameter is renamed to name.

    8.0.0upgrade guide

  • The repository parameter is renamed to name.

    8.0.0upgrade guide

  • The repository parameter is renamed to name.

    8.0.0upgrade guide

  • The ssl option is renamed to tls in client configuration.

    8.0.0upgrade guide

  • The client ships new TypeScript definitions with request and response definitions; the current definitions are removed.

    8.0.0upgrade guide

Performance 1

  • The client moves to a weight-based connection pool for better performance and less background code; the old pool can still be used.

    8.0.0upgrade guide

Behavior and default changes 3

  • The default timeout is increased to 10 minutes to help avoid premature disconnection of slow requests.

    8.19.2release notes

  • After client.close is called, new requests are rejected with NoLivingConnectionsError; in-flight requests run normally unless they require a retry.

    8.0.0upgrade guide

  • Undici replaces the default Node.js HTTP client; the old HTTP client can still be used.

    8.0.0upgrade guide

Fixes and other changes 1

  • Fixes invalid URL errors for nodes configured with a URL path prefix.

    8.19.2release notes