Skip to content

Commit 39ea85d

Browse files
authored
Merge pull request #244 from colleenmcginnis/migrate-docs
[docs] Migrate docs from AsciiDoc to Markdown
2 parents fb19967 + ba5b668 commit 39ea85d

File tree

7 files changed

+537
-61
lines changed

7 files changed

+537
-61
lines changed

docs/docset.yml

Lines changed: 485 additions & 0 deletions
Large diffs are not rendered by default.

docs/images/logo.png

-10.3 KB
Binary file not shown.

docs/index.asciidoc

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/installation.asciidoc

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 28 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,64 @@
1-
[[overview]]
2-
== Overview
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/overview.html
4+
- https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
5+
navigation_title: Rust
6+
---
37

4-
This is the official Rust client for {es}. Full documentation is hosted on
5-
https://docs.rs/elasticsearch[docs.rs] -- this page provides _only_ an overview.
8+
# Elasticsearch Rust Client [overview]
9+
10+
This is the official Rust client for {{es}}. Full documentation is hosted on [docs.rs](https://docs.rs/elasticsearch) — this page provides *only* an overview.
611

712
Further resources:
813

9-
* https://github.com/elastic/elasticsearch-rs[Source code]
10-
* https://docs.rs/elasticsearch[API documentation]
14+
* [Source code](https://github.com/elastic/elasticsearch-rs)
15+
* [API documentation](https://docs.rs/elasticsearch)
1116

1217

13-
[discrete]
14-
[[features]]
15-
=== Features
18+
## Features [features]
1619

17-
* Fluent builders for all {es} REST API endpoints
20+
* Fluent builders for all {{es}} REST API endpoints
1821
* Persistent keep-alive connections
1922
* TLS support with system or custom certificates
2023
* Proxy support with authentication
2124
* Async support with Tokio
2225

2326

24-
[discrete]
25-
=== {es} Version Compatibility
27+
## {{es}} Version compatibility [_es_version_compatibility]
2628

2729
The Elasticsearch Rust client is forward compatible; meaning that the client supports communicating with greater minor versions of Elasticsearch. Elasticsearch language clients are also backwards compatible with lesser supported minor Elasticsearch versions.
2830

2931

30-
[discrete]
31-
=== Create a client
32+
## Create a client [_create_a_client]
3233

3334
To create a client to make API calls to Elasticsearch running on `\https://localhost:9200`
3435

35-
[source,rust]
36-
----
36+
```rust
3737
let client = Elasticsearch::default();
38-
----
38+
```
3939

40-
Alternatively, you can create a client to make API calls against Elasticsearch running on a
41-
specific `url::Url`
40+
Alternatively, you can create a client to make API calls against Elasticsearch running on a specific `url::Url`
4241

43-
[source,rust]
44-
----
42+
```rust
4543
let transport = Transport::single_node("https://example.com")?;
4644
let client = Elasticsearch::new(transport);
47-
----
45+
```
4846

49-
If you're running against an Elasticsearch deployment in https://www.elastic.co/cloud/[Elastic Cloud],
50-
a client can be created using a https://www.elastic.co/guide/en/cloud/current/ec-cloud-id.html[Cloud ID]
51-
and credentials retrieved from the Cloud web console
47+
If you’re running against an Elasticsearch deployment in [Elastic Cloud](https://www.elastic.co/cloud/), a client can be created using a [Cloud ID](docs-content://deploy-manage/deploy/elastic-cloud/find-cloud-id.md) and credentials retrieved from the Cloud web console
5248

53-
[source,rust]
54-
----
49+
```rust
5550
let cloud_id = "<cloud id from cloud web console>";
5651
let credentials = Credentials::Basic("<username>".into(), "<password>".into());
5752
let transport = Transport::cloud(cloud_id, credentials)?;
5853
let client = Elasticsearch::new(transport);
59-
----
54+
```
6055

6156

62-
[discrete]
63-
=== Making API calls
57+
## Making API calls [_making_api_calls]
6458

65-
The following makes an API call to `tweets/_search` with the json body
66-
`{"query":{"match":{"message":"Elasticsearch"}}}`
59+
The following makes an API call to `tweets/_search` with the json body `{"query":{"match":{"message":"Elasticsearch"}}}`
6760

68-
[source,rust]
69-
----
61+
```rust
7062
let response = client
7163
.search(SearchParts::Index(&["tweets"]))
7264
.from(0)
@@ -87,4 +79,5 @@ for hit in response_body["hits"]["hits"].as_array().unwrap() {
8779
// print the source document
8880
println!("{:?}", hit["_source"]);
8981
}
90-
----
82+
```
83+

docs/reference/installation.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/installation.html
4+
---
5+
6+
# Installation [installation]
7+
8+
Add `elasticsearch` crate and version to Cargo.toml. Choose the version that is compatible with the version of {{es}} you are using:
9+
10+
```toml
11+
[dependencies]
12+
elasticsearch = "8.7.0-alpha.1"
13+
```
14+
15+
The following *optional* dependencies may also be useful to create requests and read responses:
16+
17+
```toml
18+
serde = "~1"
19+
serde_json = "~1"
20+
```
21+

docs/reference/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
toc:
2+
- file: index.md
3+
- file: installation.md

0 commit comments

Comments
 (0)