Skip to content

Update module github.com/elastic/go-elasticsearch/v8 to v9 - #87

Closed
renovate-update-app[bot] wants to merge 1 commit into
mainfrom
renovate/github.com-elastic-go-elasticsearch-v8-9.x
Closed

renovate-update-app[bot] wants to merge 1 commit into
mainfrom
renovate/github.com-elastic-go-elasticsearch-v8-9.x

Conversation

@renovate-update-app

@renovate-update-app renovate-update-app Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/elastic/go-elasticsearch/v8 v8.19.7 → v9.5.2 age confidence

Release Notes

elastic/go-elasticsearch (github.com/elastic/go-elasticsearch/v8)

v9.5.2

Compare Source

Features

v9.5.1

Compare Source

Features

v9.5.0

Compare Source

Features

v9.4.3

Compare Source

Features

v9.4.2

Compare Source

Bug Fixes
  • esutil: Omit empty routing query param in BulkIndexer (#​1515) (3845bb1)

v9.4.1

Compare Source

⚠ BREAKING CHANGES
  • client: (*elasticsearch.Client).ToTyped() is removed. Use elasticsearch.NewTypedFrom(c) instead.
Bug Fixes
  • client: Remove (*Client).ToTyped() to fix binary-size regression (#​1480) (86e8f65)

v9.4.0

Compare Source

⚠ BREAKING CHANGES
  • esutil: default Client to elasticsearch.NewBase in NewBulkIndexer
  • esapi: params previously typed *int on ~25 esapi endpoints are now *int64 to match the spec long type. Call sites passing untyped integer literals keep compiling; call sites passing a typed int variable need an int64(...) cast.
Features
Bug Fixes

v9.3.6

Compare Source

Features

v9.3.5

Compare Source

Bug Fixes
  • esutil: Omit empty routing query param in BulkIndexer (#​1514) (f9640f0)

v9.3.4

Compare Source

⚠ BREAKING CHANGES
  • client: (*elasticsearch.Client).ToTyped() is removed. Use elasticsearch.NewTypedFrom(c) instead.
Bug Fixes
  • client: Remove (*Client).ToTyped() to fix binary-size regression (#​1479) (7d5b37e)

v9.3.3

Compare Source

⚠ BREAKING CHANGES
  • esapi: params previously typed *int on ~20 esapi endpoints are now *int64 to match the spec long type. Call sites passing untyped integer literals keep compiling; call sites passing a typed int variable need an int64(...) cast.
Features
Bug Fixes

v9.3.2

Compare Source

⚠ BREAKING CHANGES
  • Typed API: update client from spec df81426
Features
Bug Fixes
  • esapi: Document Response.Body must be closed; fix leaks in examples (#​1313) (3b3dd1e)
  • esutil: Deterministic context check in BulkIndexer.Close (#​1340) (a02272b)
  • esutil: Propagate caller context through BulkIndexer item callbacks (#​1316) (d28cd9d)
  • Typed API: Context variable shadowing in TypedAPI Perform causing otel attributes to leak to parent span (#​1331) (f37f7d1)

v9.3.1

Compare Source

Bug Fixes
  • bulk_indexer: Enable instrumentation support in bulk index requests (#​1243) (3300e5d)
  • esutil: Avoid duplicate bulk indexer OnError callbacks (#​1251) (9255720)
  • esutil: Propagate context timeout while closing bulk indexer (#​1254) (6a0b973)
  • Prevent BulkIndexer from silently dropping items on flush failure (#​1241) (0215eec)
  • Typed API: Add field-level nil checks during deserialisation (#​1225) (fc22640)
  • Typed API: Add missing custom UnmarshalJSON methods for types with additional properties (fc22640)

v9.3.0

Compare Source

⚠ BREAKING CHANGES
  • Upgrade Go version from 1.23 to 1.24 (#​1137)
  • API: API methods and request fields that previously accepted a single string for resource identifiers (e.g., indices, names, IDs, routing, features) now require []string. Corresponding WithX helpers now accept variadic arguments (...string).
  • API: All ExpandWildcards request fields were changed from string to []string, and WithExpandWildcards helpers now accept variadic arguments (...string).
  • API: Routing parameters across document, search, and multi-document APIs were changed from string to []string, and related WithRouting helpers now accept variadic arguments (...string).
  • API: Duration-based parameters previously expressed as string now use time.Duration (e.g., KeepAlive, Interval, BucketSpan). Call sites must pass time.Duration values.
  • API: ML APIs using interface{} for start/end time parameters now require string values, removing support for arbitrary types.
  • API: Several top-level API methods now require []string instead of string for path parameters that support multiple resources (e.g., indices, templates, data streams, transforms, repositories, privileges).
  • API: MonitoringBulk was refactored: DocumentType support was removed, Interval is now time.Duration, and required parameters were added explicitly to the method signature.
  • API: Some WithX functional options changed between single-value and variadic forms to match API behaviour. Existing option usage may require updates.
  • API: Request struct fields were updated to reflect REST API semantics, including changes from string to []string and removal of deprecated fields. Direct struct initialization may require changes.
Features
  • API: Introduce strong typing for duration values (3c657da)
  • API: Support multi-value resource parameters (3c657da)
  • API: Support multiple resources per request (3c657da)
  • API: Update APIs to 9.3.0 (3c657da)
  • Expose FlushedMs metric in BulkIndexer (#​1191) (d67d0be)
  • Typed API: Add DenseVectorF32 and DenseVectorBytes types, improving indexing performance of dense vectors by up to 3x when used instead of a float32 array (f543b82)
  • Typed API: Update TypedAPI to latest elasticsearch-specification 9.3.0 (f543b82)
  • Upgrade Go version from 1.23 to 1.24 (#​1137) (05f15eb)
Bug Fixes
  • API: Align request structs with Elasticsearch REST spec (3c657da)
  • API: Align routing parameters with REST API (3c657da)
  • API: Correct functional option cardinality (3c657da)
  • API: Modernize MonitoringBulk API (3c657da)
  • API: Normalize expand_wildcards handling (3c657da)
  • API: Simplify ML time range parameters (3c657da)
  • esutil: Handle error from Seek in BulkIndexer.writeBody (#​1162) (ab7b3bb)
  • Typed API: Marshal Additional Properties into json.RawMessage instead of any to avoid loss of precision (#​1147) (e3e61d6)

v9.2.6

Compare Source

⚠ BREAKING CHANGES
  • client: (*elasticsearch.Client).ToTyped() is removed. Use elasticsearch.NewTypedFrom(c) instead.
Bug Fixes
  • client: Remove (*Client).ToTyped() to fix binary-size regression (#​1478) (e328483)

v9.2.5

Compare Source

⚠ BREAKING CHANGES
  • esapi: params previously typed *int on ~20 esapi endpoints are now *int64 to match the spec long type. Call sites passing untyped integer literals keep compiling; call sites passing a typed int variable need an int64(...) cast.
Features
Bug Fixes
  • esapi: Regenerate esapi with *int64 for long-typed params (#​1421) (e30cdb6)
  • gen: Map spec long to *int64 for esapi params (#​1392) (ef6e458)
  • gen: Normalize date URL part and param types to string (#​1415) (a029ed0)
  • gen: Pass []string to DeleteIndexTemplate in test boilerplate (#​1423) (af25eed)
  • gen: Pass []string to DeletePrivileges in xpack test boilerplate (#​1424) (d603097)
  • gen: Support *int64 fields in gen-tests output (#​1418) (3a61210)

v9.2.4

Compare Source

⚠ BREAKING CHANGES
  • Typed API: update client from spec 49022a2
Features
Bug Fixes
  • esapi: Document Response.Body must be closed; fix leaks in examples (#​1312) (c680847)
  • esutil: Deterministic context check in BulkIndexer.Close (#​1339) (0b34e21)
  • esutil: Propagate caller context through BulkIndexer item callbacks (#​1315) (cf70e22)
  • Typed API: Context variable shadowing in TypedAPI Perform causing otel attributes to leak to parent span (#​1330) (f52219c)

v9.2.3

Compare Source

Bug Fixes
  • bulk_indexer: Enable instrumentation support in bulk index requests (#​1242) (71b0b0d)
  • esutil: Avoid duplicate bulk indexer OnError callbacks (#​1250) (8537e89)
  • esutil: Propagate context timeout while closing bulk indexer (#​1253) (405af64)
  • Prevent BulkIndexer from silently dropping items on flush failure (#​1240) (755a9d3)
  • Typed API: Add field-level nil checks during deserialisation (#​1224) (59f268f)
  • Typed API: Add missing custom UnmarshalJSON methods for types with additional properties (59f268f)

v9.2.2

Compare Source

Features
Bug Fixes
  • esutil: Handle error from Seek in BulkIndexer.writeBody (#​1161) (5394405)
  • Typed API: Marshal Additional Properties into json.RawMessage instead of any to avoid loss of precision (#​1201) (b5ceeee)

v9.2.1

Compare Source

Features
Bug Fixes

v9.2.0: 9.2.0

Compare Source

API

  • Updated APIs to 9.2.0

Typed API

v9.1.2

Compare Source

Features
Bug Fixes
  • Typed API: Marshal Additional Properties into json.RawMessage instead of any to avoid loss of precision (#​1200) (f32bfca)

v9.1.1

Compare Source

Features
Bug Fixes

v9.1.0: 9.1.0

Compare Source

API

  • Updated APIs to 9.1.0

Typed API

  • Update TypedAPI to latest elasticsearch-specification 9.1
  • This release introduces a new MethodAPI used by the TypedClient which makes the client friendlier for dead code elimination.
    Reducing the size of the client when only a subset of the APIs are used. The old API structure remains available for backward compatibility, but it is now deprecated.

v9.0.1: 9.0.1

Compare Source

API

  • Updated APIs to 9.0.4

Typed API

v9.0.0: 9.0.0

Compare Source

  • The client now requires Go 1.23 or later.

New

  • This release introduces an optional package for the TypedAPI named esdsl.
    It provides a domain-specific language (DSL) for building Elasticsearch queries in Go.
    The DSL is designed to simplify query construction, making it easier to build complex queries without writing raw JSON.
// create index
{
    // delete index if exists
    if existsRes, err := es.Indices.Exists("test").IsSuccess(context.Background()); err != nil {
        log.Println(err)
        return
    } else if existsRes {
        if ok, _ := es.Indices.Delete("test").IsSuccess(context.Background()); !ok {
            log.Fatalf("Error deleting index: %v\n", err)
        }
        log.Println("Index deleted:", "test")
    } else {
        log.Println("Index does not exist:", "test")
    }

    mappings := esdsl.NewTypeMapping().
        AddProperty("name", esdsl.NewTextProperty()).
        AddProperty("age", esdsl.NewIntegerNumberProperty())

    createRes, err := es.Indices.Create("test").Mappings(mappings).Do(context.Background())
    if err != nil {
        log.Println(err)
        return
    }

    log.Printf("Index created: %#v\n", createRes)
}

// index document
{
    documents := []Document{
        {"Alice", 30},
        {"Bob", 25},
        {"Charlie", 35},
    }

    bulk := es.Bulk().Index("test")
    for _, document := range documents {
        err := bulk.IndexOp(types.IndexOperation{}, document)
        if err != nil {
            log.Println("Error indexing document:", err)
        }
    }
    bulkRes, err := bulk.Refresh(refresh.Waitfor).Do(context.Background())
    if err != nil {
        log.Println(err)
        return
    }
    if bulkRes.Errors {
        log.Println("Some documents failed to index")
        for _, item := range bulkRes.Items {
            for operationType, responseItem := range item {
                if responseItem.Error != nil {
                    log.Println("Operation:", operationType)
                    log.Println("Response:", responseItem)
                }
            }
        }
    }
    indexedDocs := 0
    for _, item := range bulkRes.Items {
        for _, responseItem := range item {
            if responseItem.Error == nil {
                indexedDocs++
            }
        }
    }

    log.Println("Documents indexed:", indexedDocs)
}

// calculate median age
{
    searchRes, err := es.Search().
        Index("test").
        Size(0).
        AddAggregation("median_age", esdsl.NewPercentilesAggregation().Field("age").Percents(50)).
        Do(context.Background())
    if err != nil {
        log.Println(err)
        return
    }

    if agg, ok := searchRes.Aggregations["median_age"].(*types.TDigestPercentilesAggregate); ok {
        if val, ok := agg.Values.(map[string]interface{})["50.0"]; ok {
            log.Println("Median age:", val)
        }
    }
}

// search documents
{
    matchRes, err := es.Search().
        Index("test").
        Query(esdsl.NewBoolQuery().
            Must(esdsl.NewMatchQuery("name", "Alice")).
            Filter(esdsl.NewNumberRangeQuery("age").Gte(20).Lte(40))).
        Sort(esdsl.NewSortOptions().AddSortOption("age", esdsl.NewFieldSort(sortorder.Asc))).
        Size(10).
        Do(context.Background())
    if err != nil {
        log.Println(err)
        return
    }
    if matchRes.Hits.Total.Value > 0 {
        for _, hit := range matchRes.Hits.Hits {
            doc := Document{}
            err := json.Unmarshal(hit.Source_, &doc)
            if err != nil {
                log.Println("Error unmarshalling document:", err)
                continue
            }
            log.Printf("Document ID: %s, Name: %s, Age: %d\n", *hit.Id_, doc.Name, doc.Age)
        }
    } else {
        log.Println("No documents found")
    }
}

API

  • Updated APIs to 9.0.0

Typed API


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

@renovate-update-app
renovate-update-app Bot force-pushed the renovate/github.com-elastic-go-elasticsearch-v8-9.x branch 2 times, most recently from c018ef5 to 67f4e59 Compare October 16, 2026 12:46
@rb3ckers rb3ckers added dependencies/major Dependency updates that include a major version upgrade and removed dependencies labels Oct 16, 2026
@renovate-update-app
renovate-update-app Bot force-pushed the renovate/github.com-elastic-go-elasticsearch-v8-9.x branch from 67f4e59 to 45b5706 Compare October 16, 2026 14:42
@rb3ckers rb3ckers closed this Oct 16, 2026
@renovate-update-app

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 9.x releases. But if you manually upgrade to 9.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate-update-app
renovate-update-app Bot deleted the renovate/github.com-elastic-go-elasticsearch-v8-9.x branch October 17, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies/major Dependency updates that include a major version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant