Skip to content

Commit c5362c3

Browse files
authored
prepare for 0.21.0-pre.5 release (#371)
1 parent 901f731 commit c5362c3

File tree

182 files changed

+584
-424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+584
-424
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Add `elastic` to your `Cargo.toml`:
3333

3434
```toml
3535
[dependencies]
36-
elastic = "0.21.0-pre.4"
37-
elastic_derive = "0.21.0-pre.4"
36+
elastic = "0.21.0-pre.5"
37+
elastic_derive = "0.21.0-pre.5"
3838
serde_json = "1"
3939
```
4040

examples/account_sample/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ authors = ["Ashley Mannix <[email protected]>"]
55
publish = false
66

77
[dependencies]
8-
elastic = { version = "~0.21.0-pre.4", path = "../../src/elastic" }
9-
elastic_derive = { version = "~0.21.0-pre.4", path = "../../src/elastic_derive" }
8+
elastic = { version = "~0.21.0-pre.5", path = "../../src/elastic" }
9+
elastic_derive = { version = "~0.21.0-pre.5", path = "../../src/elastic_derive" }
1010

1111
quick-error = "~1"
1212
serde = "~1"

src/elastic/Cargo.toml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "elastic"
3-
version = "0.21.0-pre.4"
3+
version = "0.21.0-pre.5"
44
edition = "2018"
55
authors = ["Ashley Mannix <[email protected]>"]
66
license = "MIT/Apache-2.0"
@@ -14,8 +14,17 @@ readme = "../../README.md"
1414
travis-ci = { repository = "elastic-rs/elastic" }
1515
appveyor = { repository = "elastic-rs/elastic" }
1616

17+
[features]
18+
rustls-tls = [
19+
"reqwest/rustls-tls"
20+
]
21+
22+
default-tls = [
23+
"reqwest/default-tls"
24+
]
25+
1726
[dependencies]
18-
elastic_derive = { version = "~0.21.0-pre.4", path = "../elastic_derive" }
27+
elastic_derive = { version = "~0.21.0-pre.5", path = "../elastic_derive" }
1928

2029
quick-error = "~1"
2130
error-chain = "~0.11"
@@ -27,7 +36,7 @@ http = "~0.1"
2736
serde = "~1"
2837
serde_json = "~1"
2938
serde_derive = "~1"
30-
reqwest = { version = "~0.9", default-features = false, features = ["rustls-tls"]}
39+
reqwest = { version = "~0.9", default-features = false }
3140
futures = "~0.1"
3241
tokio = "~0.1"
3342
tokio-threadpool = "~0.1"

src/elastic/src/client/mod.rs

+50-25
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,38 @@ The details are explained below.
133133
# Request builders
134134
135135
Some commonly used endpoints have high-level builder methods you can use to configure requests easily.
136-
They're exposed as methods on the `Client`:
136+
They're exposed as methods on the `Client`.
137+
138+
## Common requests
139+
140+
These request methods are called directly on a [`Client`][`Client`].
137141
138142
Client method | Elasticsearch API | Raw request type | Response type
139143
------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------- | ------------------------------------
140144
[`search`][Client.search] | [Search][docs-search] | [`SearchRequest`][SearchRequest] | [`SearchResponse`][SearchResponse]
141145
[`bulk`][Client.bulk] | [Bulk][docs-bulk] | [`BulkRequest`][BulkRequest] | [`BulkResponse`][BulkResponse]
142146
[`ping`][Client.ping] | - | [`PingRequest`][PingRequest] | [`PingResponse`][PingResponse]
147+
[`sql`][Client.sql] | [SQL][docs-sql] | [`SqlQueryRequest`][SqlQueryRequest] | [`SqlQueryResponse`][SqlQueryResponse]
148+
149+
## Document requests
150+
151+
These request methods are called on a [`DocumentClient`][`DocumentClient`].
152+
153+
Client method | Elasticsearch API | Raw request type | Response type
154+
------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------- | ------------------------------------
143155
[`document.search`][Client.document.search] | [Search][docs-search] | [`SearchRequest`][SearchRequest] | [`SearchResponse`][SearchResponse]
144156
[`document.get`][Client.document.get] | [Get Document][docs-get] | [`GetRequest`][GetRequest] | [`GetResponse`][GetResponse]
145157
[`document.index`][Client.document.index] | [Index Document][docs-index] | [`IndexRequest`][IndexRequest] | [`IndexResponse`][IndexResponse]
146158
[`document.update`][Client.document.update] | [Update Document][docs-update] | [`UpdateRequest`][UpdateRequest] | [`UpdateResponse`][UpdateResponse]
147159
[`document.delete`][Client.document.delete] | [Delete Document][docs-delete] | [`DeleteRequest`][DeleteRequest] | [`DeleteResponse`][DeleteResponse]
148160
[`document.put_mapping`][Client.document.put_mapping] | [Put Mapping][docs-mapping] | [`IndicesPutMappingRequest`][IndicesPutMappingRequest] | [`CommandResponse`][CommandResponse]
161+
162+
## Index requests
163+
164+
These request methods are called on a [`IndexClient`][`IndexClient`].
165+
166+
Client method | Elasticsearch API | Raw request type | Response type
167+
------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------- | ------------------------------------
149168
[`index.create`][Client.index.create] | [Create Index][docs-create-index] | [`IndicesCreateRequest`][IndicesCreateRequest] | [`CommandResponse`][CommandResponse]
150169
[`index.open`][Client.index.open] | [Open Index][docs-open-index] | [`IndicesOpenRequest`][IndicesOpenRequest] | [`CommandResponse`][CommandResponse]
151170
[`index.close`][Client.index.close] | [Close Index][docs-close-index] | [`IndicesCloseRequest`][IndicesCloseRequest] | [`CommandResponse`][CommandResponse]
@@ -217,7 +236,7 @@ The basic flow from request to response is:
217236
[RawRequestBuilder.send()] ---> [ResponseBuilder]
218237
```
219238
220-
**3)** Parse the response builder to a [response type][response-types]:
239+
**3)** Parse the response builder to a response type:
221240
222241
```text
223242
[ResponseBuilder.into_response()] ---> [ResponseType]
@@ -316,7 +335,7 @@ let response = request_builder.send();
316335
317336
### 3. Parsing responses synchronously
318337
319-
Call [`SyncResponseBuilder.into_response`][SyncResponseBuilder.into_response] on a sent request to get a [strongly typed response][response-types]:
338+
Call [`SyncResponseBuilder.into_response`][SyncResponseBuilder.into_response] on a sent request to get a [strongly typed response][responses-mod]:
320339
321340
```no_run
322341
# #[macro_use] extern crate serde_json;
@@ -385,7 +404,7 @@ For more details see the [`responses`][responses-mod] module.
385404
386405
### 3. Parsing responses asynchronously
387406
388-
Call [`AsyncResponseBuilder.into_response`][AsyncResponseBuilder.into_response] on a sent request to get a [strongly typed response][response-types]:
407+
Call [`AsyncResponseBuilder.into_response`][AsyncResponseBuilder.into_response] on a sent request to get a [strongly typed response][responses-mod]:
389408
390409
```no_run
391410
# #[macro_use] extern crate serde_json;
@@ -453,18 +472,19 @@ future.and_then(|body| {
453472
`AsyncHttpResponse` implements the async `Stream` trait so you can buffer out the raw response data.
454473
For more details see the [`responses`][responses-mod] module.
455474
456-
[docs-bulk]: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
457-
[docs-search]: http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html
458-
[docs-get]: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
459-
[docs-update]: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html
460-
[docs-delete]: http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
461-
[docs-index]: https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
462-
[docs-mapping]: https://www.elastic.co/guide/en/elasticsearch/reference/master/mapping.html
463-
[docs-create-index]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
464-
[docs-close-index]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
465-
[docs-open-index]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
466-
[docs-index-exists]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
467-
[docs-delete-index]: https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
475+
[docs-bulk]: http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
476+
[docs-search]: http://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html
477+
[docs-sql]: https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-spec.html
478+
[docs-get]: http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
479+
[docs-update]: http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
480+
[docs-delete]: http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html
481+
[docs-index]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
482+
[docs-mapping]: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html
483+
[docs-create-index]: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
484+
[docs-close-index]: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html
485+
[docs-open-index]: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html
486+
[docs-index-exists]: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html
487+
[docs-delete-index]: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html
468488
469489
[tokio]: https://tokio.rs
470490
@@ -474,9 +494,13 @@ For more details see the [`responses`][responses-mod] module.
474494
[SyncClientBuilder]: struct.SyncClientBuilder.html
475495
[AsyncClient]: type.AsyncClient.html
476496
[AsyncClientBuilder]: struct.AsyncClientBuilder.html
497+
[`Client`]: struct.Client.html
498+
[`DocumentClient`]: struct.DocumentClient.html
499+
[`IndexClient`]: struct.IndexClient.html
477500
[Client.request]: struct.Client.html#method.request
478501
[Client.bulk]: struct.Client.html#bulk-request
479502
[Client.search]: struct.Client.html#search-request
503+
[Client.sql]: struct.Client.html#sql-request
480504
[Client.document.search]: struct.DocumentClient.html#search-request
481505
[Client.document.get]: struct.DocumentClient.html#get-document-request
482506
[Client.document.update]: struct.DocumentClient.html#update-document-request
@@ -494,6 +518,7 @@ For more details see the [`responses`][responses-mod] module.
494518
[RequestBuilder.params]: requests/struct.RequestBuilder.html#method.params
495519
[RawRequestBuilder]: requests/type.RawRequestBuilder.html
496520
[SearchRequest]: requests/endpoints/struct.SearchRequest.html
521+
[SqlQueryRequest]: requests/endpoints/struct.SqlQueryRequest.html
497522
[BulkRequest]: requests/endpoints/struct.BulkRequest.html
498523
[GetRequest]: requests/endpoints/struct.GetRequest.html
499524
[UpdateRequest]: requests/endpoints/struct.UpdateRequest.html
@@ -508,13 +533,14 @@ For more details see the [`responses`][responses-mod] module.
508533
[PingRequest]: requests/endpoints/struct.PingRequest.html
509534
510535
[responses-mod]: responses/index.html
511-
[SyncResponseBuilder]: responses/struct.SyncResponseBuilder.html
512-
[SyncResponseBuilder.into_response]: responses/struct.SyncResponseBuilder.html#method.into_response
513-
[SyncResponseBuilder.into_raw]: responses/struct.SyncResponseBuilder.html#method.into_raw
514-
[AsyncResponseBuilder]: responses/struct.AsyncResponseBuilder.html
515-
[AsyncResponseBuilder.into_response]: responses/struct.AsyncResponseBuilder.html#method.into_response
516-
[AsyncResponseBuilder.into_raw]: responses/struct.AsyncResponseBuilder.html#method.into_raw
536+
[SyncResponseBuilder]: ../http/receiver/struct.SyncResponseBuilder.html
537+
[SyncResponseBuilder.into_response]: ../http/receiver/struct.SyncResponseBuilder.html#method.into_response
538+
[SyncResponseBuilder.into_raw]: ../http/receiver/struct.SyncResponseBuilder.html#method.into_raw
539+
[AsyncResponseBuilder]: ../http/receiver/struct.AsyncResponseBuilder.html
540+
[AsyncResponseBuilder.into_response]: ../http/receiver/struct.AsyncResponseBuilder.html#method.into_response
541+
[AsyncResponseBuilder.into_raw]: ../http/receiver/struct.AsyncResponseBuilder.html#method.into_raw
517542
[SearchResponse]: responses/struct.SearchResponse.html
543+
[SqlQueryResponse]: responses/struct.SqlQueryResponse.html
518544
[BulkResponse]: responses/struct.BulkResponse.html
519545
[GetResponse]: responses/struct.GetResponse.html
520546
[UpdateResponse]: responses/struct.UpdateResponse.html
@@ -523,9 +549,8 @@ For more details see the [`responses`][responses-mod] module.
523549
[IndicesExistsResponse]: responses/struct.IndicesExistsResponse.html
524550
[PingResponse]: responses/struct.PingResponse.html
525551
[CommandResponse]: responses/struct.CommandResponse.html
526-
[SyncHttpResponse]: responses/struct.SyncHttpResponse.html
527-
[AsyncHttpResponse]: responses/struct.AsyncHttpResponse.html
528-
[response-types]: responses/parse/trait.IsOk.html#implementors
552+
[SyncHttpResponse]: ../http/receiver/struct.SyncHttpResponse.html
553+
[AsyncHttpResponse]: ../http/receiver/struct.AsyncHttpResponse.html
529554
530555
[documents-mod]: ../types/documents/index.html
531556
*/

src/elastic/src/client/requests/bulk/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
Builders for [bulk requests][docs-bulk].
33
4-
[docs-bulk]: https://www.elastic.co/guide/en/elasticsearch/reference/master/bulk.html
4+
[docs-bulk]: https://www.elastic.co/guide/en/elasticsearch/reference/current/bulk.html
55
*/
66

77
use std::{
@@ -63,7 +63,7 @@ The `send` method will either send the request [synchronously][send-sync] or [as
6363
6464
Call [`Client.bulk_stream`][Client.bulk_stream] to get a `BulkRequestBuilder` that can be used to stream bulk operations asynchronously.
6565
66-
[docs-bulk]: https://www.elastic.co/guide/en/elasticsearch/reference/master/bulk.html
66+
[docs-bulk]: https://www.elastic.co/guide/en/elasticsearch/reference/current/bulk.html
6767
[send-sync]: #send-synchronously
6868
[send-async]: #send-asynchronously
6969
[Client.bulk]: ../../struct.Client.html#bulk-request
@@ -150,7 +150,7 @@ where
150150
[send-async]: requests/bulk/type.BulkRequestBuilder.html#send-asynchronously
151151
[types-mod]: ../../types/index.html
152152
[documents-mod]: ../../types/document/index.html
153-
[docs-querystring]: https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-query-string-query.html
153+
[docs-querystring]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
154154
*/
155155
pub fn bulk(&self) -> BulkRequestBuilder<TSender, Vec<u8>, BulkResponse> {
156156
RequestBuilder::initial(
@@ -238,7 +238,7 @@ impl Client<AsyncSender> {
238238
[send-async]: requests/bulk/type.BulkRequestBuilder.html#send-asynchronously
239239
[types-mod]: ../../types/index.html
240240
[documents-mod]: ../../types/document/index.html
241-
[docs-querystring]: https://www.elastic.co/guide/en/elasticsearch/reference/master/query-dsl-query-string-query.html
241+
[docs-querystring]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
242242
*/
243243
pub fn bulk_stream<TDocument>(
244244
&self,

0 commit comments

Comments
 (0)