github elastic/elasticsearch-net 7.0.0-beta1

pre-release5 years ago

7.0.0-alpha2...7.0.0-beta1

Following the advice given in 7.0.0-alpha1 the namespacing change has been implemented for this release.

Namespaced API methods

In both Elasticsearch.Net and NEST clients, API methods are made available on the root of the client. As the API surface of Elasticsearch has grown to well over 200 endpoints, so has the number of API methods exposed, leading to an almost overwhelming number of methods to navigate through to choose the method aligning with the desired API call. This is further exacerbated by the fact that the client exposes synchronous and asynchronous API methods for both the fluent API syntax as well as the object initializer syntax.

To address this, the APIs are now accessible through sub-properties on the client instance.

For example, in 6.x, to create a Machine Learning job the code is:

var putJobResponse = client.PutJob<Metric>("id", c => c
    .Description("Lab 1 - Simple example")
    .ResultsIndexName("server-metrics")
    .AnalysisConfig(a => a
        .BucketSpan("30m")
        .Detectors(d => d.Sum(c => c.FieldName(r => r.Total)))
    )
    .DataDescription(d => d.TimeField(r => r.Timestamp));
);

This has changed to:

var putJobResponse = client.MachineLearning.PutJob<Metric>("id", c => c
    .Description("Lab 1 - Simple example")
    .ResultsIndexName("server-metrics")
    .AnalysisConfig(a => a
        .BucketSpan("30m")
        .Detectors(d => d.Sum(c => c.FieldName(r => r.Total)))
    )
    .DataDescription(d => d.TimeField(r => r.Timestamp));
);

Notice the client.MachineLearning.PutJob method call in 7.0.0-beta1, as opposed to client.PutJob in 6.x

Features & Enhancements

  • #3809 Add overloads of SerializeToString and SerializeToBytes
  • #3765 Clean up GET /_cluster/stats
  • #3807 Use indexers to set default mapping values
  • #3806 User SecureString for Basic and Proxy passwords

Bug Fixes

  • #3771 Breaking formatter backwards compatibility
  • #3805 Routing must be specified when doc used
  • #3706 Calling ConnectionSettings.DefaultMappingFor throws ArgumentException when the Type has been previously added
  • #3719 Wrong converting datetime fields
  • #3751 Unable to get raw document JSON without deserializing

View the full list of issues and PRs

Don't miss a new elasticsearch-net release

NewReleases is sending notifications on new releases.