Elasticsearch Net Versions Save

This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.

8.13.2

1 month ago

What's Changed

Full Changelog: https://github.com/elastic/elasticsearch-net/compare/8.13.1...8.13.2

8.13.1

1 month ago

8.13.0

1 month ago

Introduction

This version of the client is the first one generated by a completely revised code generator. In addition to more than 200 new endpoints, which were not yet supported in 8.12.1, 8.13.0 finally supports all aggregations and many other previously unavailable features.

The support of these new functions is accompanied by some breaking changes. In the next section, we have been working to document all of these changes and show the new usage with code examples. If you come across any undocumented changes, please feel free to open an issue

Although the most common endpoints have been tested by hand, there is a possibility that this version contains a few minor bugs. If you come across such a bug, please let us know. Over the next few weeks, we will closely monitor the issue tracker and respond quickly with appropriate patch releases.

Breaking Changes

Aggregations

The aggregation name and the sub-aggregations property was pulled out of the actual aggregation variant classes. The usage changes from:

var aggExampleResponse = await client.SearchAsync<StockData>(s => s
    .Aggregations(aggs => aggs
        .DateHistogram("by-month", dh => dh
            .CalendarInterval(CalendarInterval.Month)
            .Field(fld => fld.Date)
            .Aggregations(subaggs => subaggs
                .Sum("trade-volumes", sum => sum.Field(fld => fld.Volume))
            )
        )
    )
);

to:

var aggExampleResponse = await client.SearchAsync<StockData>(s => s
    .Aggregations(aggs => aggs
        .Add("by-month", agg => agg
            .DateHistogram(dh => dh
                .CalendarInterval(CalendarInterval.Month)
                .Field(fld => fld.Date)
            )
            .Aggregations(subaggs => subaggs
                .Add("trade-volumes", agg => agg
                    .Sum(sum => sum.Field(fld => fld.Volume))
                )
            )
        )
    )
);

In the response, the sub-aggregations are no longer part of the bucket class itself, but must be accessed through the Aggregations property instead. Usage changes from:

var monthlyBuckets = aggExampleResponse.Aggregations?.GetDateHistogram("by-month")?.Buckets ?? Array.Empty<DateHistogramBucket>();

foreach (var monthlyBucket in monthlyBuckets)
{
    var volume = monthlyBucket.GetSum("trade-volumes");
    Console.WriteLine($"{monthlyBucket.Key} : {volume}");
}

to:

var monthlyBuckets = aggExampleResponse.Aggregations?.GetDateHistogram("by-month")?.Buckets ?? Array.Empty<DateHistogramBucket>();

foreach (var monthlyBucket in monthlyBuckets)
{
    var volume = monthlyBucket.Aggregations.GetSum("trade-volumes");
    Console.WriteLine($"{monthlyBucket.Key} : {volume}");
}

Please as well note, that it is no longer possible to compose a dictionary/list of aggregations using the && operator.

Query

Query variants no longer derive from SearchQuery. This has some implications on usage. Instead of being able to e.g. use logical operators on query variants like this:

var myQuery = new TermQuery("field") { Value = "a" } || new TermQuery("field") { Value = "b" };
// => BoolQuery variant

you have to wrap the query into the container first:

var myQuery = Query.Term(new("field") { Value = "a" }) || Query.Term(new("field") { Value = "b" });
// => Query container that wraps a BoolQuery variant

Deprecation of synchronous APIs

This version deprecates all synchronous endpoint API methods in the ElasticsearchClient class (and namespaced versions).

What's Changed

  • Regenerate client for 8.13 (#8071)

Full Changelog: https://github.com/elastic/elasticsearch-net/compare/8.12.1...8.13.0

8.12.1

1 month ago

What's Changed

New Contributors

Full Changelog: https://github.com/elastic/elasticsearch-net/compare/8.12.0...8.12.1

8.12.0

3 months ago

https://github.com/elastic/elasticsearch-net/compare/8.11.0...8.12.0

Features & Enhancements

  • #8027 Regenerate client for 8.12

Bug Fixes

  • #8018 Fix serialisation of empty and single item Fields instances

View the full list of issues and PRs

8.11.0

6 months ago

https://github.com/elastic/elasticsearch-net/compare/8.10.0...8.11.0

Features & Enhancements

  • #7978 Regenerate client for 8.11

Bug fixes

  • #7979 Add workaround for stringified properties which are not marked properly in specification
  • #7965 Fix Stringified converters

View the full list of issues and PRs

8.10.0

7 months ago

https://github.com/elastic/elasticsearch-net/compare/8.9.3...8.10.0

Features & Enhancements

  • #7931 Refactor OpenTelemetry implementation with updated Transport (issue: #7885)

Bug fixes

  • #7953 Add TDigestPercentilesAggregate (issues: #7923, #7879)
  • #7956 Add Similarity to KnnQuery (issue: #7952)

View the full list of issues and PRs

8.9.3

8 months ago

https://github.com/elastic/elasticsearch-net/compare/8.9.2...8.9.3

Features & Enhancements

  • #7894 Reintroduce suggestion feature (issue: #7390)
  • #7923 Add PercentilesAggregation and PercentileRanksAggregation (issue: #7879)
  • #7914 Update Elastic.Transport dependency
  • #7920 Regenerate client using the latest specification

View the full list of issues and PRs

8.9.2

9 months ago

https://github.com/elastic/elasticsearch-net/compare/8.9.1...8.9.2

Bug fixes

  • #7875 Fix aggregations property not being generated for MultisearchBody (issue #7873)
  • #7875 Remove invalid properties from SlowlogTresholds (issue #7865)
  • #7883 Remove leading / character from API urls (issue: #7878)

Features & Enhancements

  • #7869 Add support for SimpleQueryStringQuery.flags property (issue: #7863)

View the full list of issues and PRs

8.9.1

9 months ago