Releases: elastic-rs/elastic
Release list
0.20.10
0.20.8
0.20.7
This release adds the index_exists method to the client.
elastic
- Adds an
index_existsmethod to the sync and async clients
elastic_responses
- Add an
IndexExistsResponsetype. 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
IsOktrait. This makes it possible to return data to deserialise as anIndexExistsResponsedepending on the status code
0.20.6
0.20.5
0.20.3
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
This release includes integration tests, doc fixes and some more endpoints on the client.
elastic
Added the following new endpoints to the Client:
document_updatedocument_deleteindex_closeindex_openindex_deleteping
Fixed some errors in documentation.
elastic_responses
Added the following new types:
UpdateResponseDeleteResponse
0.20.1
0.20.0
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_requestselastic_responseselastic_types_derive_internalselastic_types_deriveelastic_typeselastic_deriveelastic
Some specifics
elastic
Clienthas been renamed toSyncClientandClientBuilderhas been renamed toSyncClientBuilderClient::newhas been removed in favour ofSyncClientBuilder
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
remapmethods to be static methods instead of instance methods - Add
DateExprfor supporting date math expressions
Changes to Date
- Change
Date<F, M = DefaultDateMapping<F>>toDate<M>. So you can't just writeDate<EpochMillis>anymore, it needs to beDate<DefaultDateMapping<EpochMillis>>. This simplifies the generics, and makesDateeasier to work with. To get the ergonomics ofDate<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
DateValueandFormattableDateValuetype - Use
DateValuein theDateFormat::parseandDateFormat::formatmethods instead ofchrono::DateTime - Remove the conversion from
chrono::DateTimeintoDate<M>unlessM::Format = ChronoFormat. This is becausechrono::DateTimeis already mappable with theChronoFormat, so to make sure that formats aren't implicitly changed, you need to convert achrono::DateTimeinto aDateValuefirst, 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 toGeoPoint<M>. Use the same type aliases approach for ergonomics
elastic_responses
- Make all fields on response types private
- Add iterators to response types. For
BulkResponseandBulkErrorsResponse, calliterorinto_iter. ForSearchResponsecallhits,into_hits,documentsorinto_documents. - Remove the
SearchResponseOfandGetResponseOftypes. NowSearchResponseandGetResponserequire a generic type for the kind of document they contain.serde_json::Valueis re-exported for convenience.