From dbf2a09afba57cdf1c4503cae795df3f9c50d431 Mon Sep 17 00:00:00 2001 From: Eldad Zack Date: Tue, 18 Jul 2023 10:08:26 +0200 Subject: [PATCH 1/2] Correct documentation to match `http::transport::DEFAULT_ADDRESS` --- README.md | 2 +- docs/overview.asciidoc | 4 ++-- elasticsearch/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1dcf9d21..1be5c104 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Build a transport to make API requests to Elasticsearch using the `TransportBuil which allows setting of proxies, authentication schemes, certificate validation, and other transport related settings. -To create a client to make API calls to Elasticsearch running on `http://localhost:9200` +To create a client to make API calls to Elasticsearch running on `https://localhost:9200` ```rust,no_run use elasticsearch::Elasticsearch; diff --git a/docs/overview.asciidoc b/docs/overview.asciidoc index 562c8f56..9c4036a5 100644 --- a/docs/overview.asciidoc +++ b/docs/overview.asciidoc @@ -30,7 +30,7 @@ The Elasticsearch Rust client is forward compatible; meaning that the client sup [discrete] === Create a client -To create a client to make API calls to Elasticsearch running on `\http://localhost:9200` +To create a client to make API calls to Elasticsearch running on `\https://localhost:9200` [source,rust] ---- @@ -87,4 +87,4 @@ for hit in response_body["hits"]["hits"].as_array().unwrap() { // print the source document println!("{:?}", hit["_source"]); } ----- \ No newline at end of file +---- diff --git a/elasticsearch/src/lib.rs b/elasticsearch/src/lib.rs index 92409b94..6637b3f4 100644 --- a/elasticsearch/src/lib.rs +++ b/elasticsearch/src/lib.rs @@ -108,7 +108,7 @@ //! //! ## Create a client //! -//! To create a client to make API calls to Elasticsearch running on `http://localhost:9200` +//! To create a client to make API calls to Elasticsearch running on `https://localhost:9200` //! //! ```rust,no_run //! # use elasticsearch::Elasticsearch; From 8802648b9fec07235b239bb62aee2b448d2230df Mon Sep 17 00:00:00 2001 From: Eldad Zack Date: Tue, 18 Jul 2023 10:10:13 +0200 Subject: [PATCH 2/2] add missing `json` format to cat index query --- elasticsearch/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch/src/lib.rs b/elasticsearch/src/lib.rs index 6637b3f4..793d8a4c 100644 --- a/elasticsearch/src/lib.rs +++ b/elasticsearch/src/lib.rs @@ -188,6 +188,7 @@ //! let response = client //! .cat() //! .indices(CatIndicesParts::Index(&["*"])) +//! .format("json") //! .send() //! .await?; //!