Skip to content

Releases: elastic-rs/elastic

0.20.10

07 May 00:28
Compare
Choose a tag to compare
  • Fixes up a bug attempting to use HashMap as a field in a document
  • Fixes up some dead links in the readme

0.20.8

17 Dec 22:54
Compare
Choose a tag to compare

This is another house-keeping release without any code changes.

  • Fixes some documentation errors around the index_exists method
  • Updates the licence field in Cargo.toml files to reflect the dual Apache/MIT license

0.20.7

17 Dec 06:05
Compare
Choose a tag to compare

This release adds the index_exists method to the client.

elastic

  • Adds an index_exists method to the sync and async clients

elastic_responses

  • Add an IndexExistsResponse type. Elasticsearch doesn't actually return any data with an index exists response (it just uses the HTTP status code), so this type doesn't actually represent what Elasticsearch's API returns
  • Adds support for returning arbitrary json data from the IsOk trait. This makes it possible to return data to deserialise as an IndexExistsResponse depending on the status code

0.20.6

30 Nov 11:08
Compare
Choose a tag to compare
  • Change the version bound for quick-error from ~1.1 to ~1
  • Change the version bound for bytes from =0.4.5 to ~0.4.5

0.20.5

25 Nov 09:45
Compare
Choose a tag to compare
  • Fixes a compile error in the queries crate. There aren't any other code changes in this release.

0.20.3

27 Oct 08:41
Compare
Choose a tag to compare

This release adds some documentation to the generated Elasticsearch endpoint types.

elastic_requests

Generate documentation along with the endpoint types. The docs include:

  • The HTTP verb and default path for the endpoint
  • The path for each variant for the endpoint

This should make it easier to work out what type corresponds to what request endpoint in Elasticsearch.

0.20.2

20 Oct 09:22
Compare
Choose a tag to compare

This release includes integration tests, doc fixes and some more endpoints on the client.

elastic

Added the following new endpoints to the Client:

  • document_update
  • document_delete
  • index_close
  • index_open
  • index_delete
  • ping

Fixed some errors in documentation.

elastic_responses

Added the following new types:

  • UpdateResponse
  • DeleteResponse

0.20.1

16 Oct 00:48
Compare
Choose a tag to compare

There aren't any observable source changes in this release, just some house-keeping for builds and metadata.

  • Add elastic_queries into the tree. There isn't a release on crates.io for this yet
  • Add readme keys to Cargo.toml files

0.20.0

05 Oct 08:58
Compare
Choose a tag to compare

A note on this release

There have been a lot of changes across many repositories. This makes it difficult to provide a comprehensive list of breaking changes (there are a number of them, but upgrading should be fairly mechanical). For future releases we'll start maintaining a CHANGELOG to collect changes as they occur.

The following is a general list of significant changes.

Async

This release adds async support to elastic using the tokio and futures ecosystem.

The implementation uses generics to parameterise request builders. This means we share a lot of code between the sync and async APIs, but can make the docs noisier and harder to follow.

Combining repositories

Each of the crates in the elastic organisation have been pulled in to this single repository. This will make it easier to track changes in the future, as well as share CI infrastructure. Overall it should lead to a more solid and contributor-friendly project.

elastic now contains the following crates with synchronized versions:

  • elastic_requests
  • elastic_responses
  • elastic_types_derive_internals
  • elastic_types_derive
  • elastic_types
  • elastic_derive
  • elastic

Some specifics

elastic

  • Client has been renamed to SyncClient and ClientBuilder has been renamed to SyncClientBuilder
  • Client::new has been removed in favour of SyncClientBuilder

elastic_types

This release refactors Date to start reducing dependence on chrono::DateTime, and to make sure date formats aren't implicitly changed. Some of these changes might turn out to be too restrictive and may be reverted in the future (allowing formats to change without explicit conversions).

  • Change remap methods to be static methods instead of instance methods
  • Add DateExpr for supporting date math expressions

Changes to Date

  • Change Date<F, M = DefaultDateMapping<F>> to Date<M>. So you can't just write Date<EpochMillis> anymore, it needs to be Date<DefaultDateMapping<EpochMillis>>. This simplifies the generics, and makes Date easier to work with. To get the ergonomics of Date<EpochMillis> back, you can use type aliases:
// For default date types with just a single format
type MyDateType = Date<DefaultDateMapping<EpochMillis>>;

// For default date types with any format
type MyDateType<F> = Date<DefaultDateMappinng<F>>;
  • Adds a DateValue and FormattableDateValue type
  • Use DateValue in the DateFormat::parse and DateFormat::format methods instead of chrono::DateTime
  • Remove the conversion from chrono::DateTime into Date<M> unless M::Format = ChronoFormat. This is because chrono::DateTime is already mappable with the ChronoFormat, so to make sure that formats aren't implicitly changed, you need to convert a chrono::DateTime into a DateValue first, which doesn't have any format:

Before:

let date = Date::from(chrono_date);

After:

let date = Date::from(DateValue::from(chrono_date));

Changes to GeoPoint

  • Like Date, GeoPoint<F, M = DefaultGeoPointMapping<F>> has been changed to GeoPoint<M>. Use the same type aliases approach for ergonomics

elastic_responses

  • Make all fields on response types private
  • Add iterators to response types. For BulkResponse and BulkErrorsResponse, call iter or into_iter. For SearchResponse call hits, into_hits, documents or into_documents.
  • Remove the SearchResponseOf and GetResponseOf types. Now SearchResponse and GetResponse require a generic type for the kind of document they contain. serde_json::Value is re-exported for convenience.

0.13.3

01 Aug 00:13
Compare
Choose a tag to compare

Fixes a build failure on nightly due to unused doc comments in error_chain.