Skip to content

Commit 7420379

Browse files
[DOCS] Create Elasticsearch basics section, refactor quickstarts section (elastic#112436)
Co-authored-by: shainaraskas <[email protected]>
1 parent 1593c06 commit 7420379

File tree

8 files changed

+323
-213
lines changed

8 files changed

+323
-213
lines changed

docs/reference/index.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ include::links.asciidoc[]
66

77
include::landing-page.asciidoc[]
88

9-
include::intro.asciidoc[]
10-
119
include::release-notes/highlights.asciidoc[]
1210

11+
include::intro.asciidoc[]
12+
1313
include::quickstart/index.asciidoc[]
1414

1515
include::setup.asciidoc[]

docs/reference/intro.asciidoc

Lines changed: 259 additions & 109 deletions
Large diffs are not rendered by default.

docs/reference/landing-page.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
Elasticsearch is the search and analytics engine that powers the Elastic Stack.
6363
</p>
6464
<p>
65-
<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html">
65+
<a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/elasticsearch-intro.html">
6666
<button class="btn btn-primary">Get started</button>
6767
</a>
6868
</p>

docs/reference/quickstart/getting-started.asciidoc

Lines changed: 19 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,20 @@
11
[[getting-started]]
2-
== Quick start guide
2+
== Quick start: Add data using Elasticsearch APIs
3+
++++
4+
<titleabbrev>Basics: Add data using APIs</titleabbrev>
5+
++++
36

4-
This guide helps you learn how to:
7+
In this quick start guide, you'll learn how to do the following tasks:
58

6-
* Run {es} and {kib} (using {ecloud} or in a local Docker dev environment),
7-
* add simple (non-timestamped) dataset to {es},
8-
* run basic searches.
9-
10-
[TIP]
11-
====
12-
If you're interested in using {es} with Python, check out Elastic Search Labs. This is the best place to explore AI-powered search use cases, such as working with embeddings, vector search, and retrieval augmented generation (RAG).
13-
14-
* https://www.elastic.co/search-labs/tutorials/search-tutorial/welcome[Tutorial]: this walks you through building a complete search solution with {es}, from the ground up.
15-
* https://github.com/elastic/elasticsearch-labs[`elasticsearch-labs` repository]: it contains a range of Python https://github.com/elastic/elasticsearch-labs/tree/main/notebooks[notebooks] and https://github.com/elastic/elasticsearch-labs/tree/main/example-apps[example apps].
16-
====
17-
18-
[discrete]
19-
[[run-elasticsearch]]
20-
=== Run {es}
21-
22-
The simplest way to set up {es} is to create a managed deployment with {ess} on
23-
{ecloud}. If you prefer to manage your own test environment, install and
24-
run {es} using Docker.
25-
26-
include::{es-ref-dir}/tab-widgets/code.asciidoc[]
27-
include::{es-ref-dir}/tab-widgets/quick-start-install-widget.asciidoc[]
28-
29-
[discrete]
30-
[[send-requests-to-elasticsearch]]
31-
=== Send requests to {es}
32-
33-
You send data and other requests to {es} using REST APIs. This lets you interact
34-
with {es} using any client that sends HTTP requests, such as
35-
https://curl.se[curl]. You can also use {kib}'s Console to send requests to
36-
{es}.
37-
38-
include::{es-ref-dir}/tab-widgets/api-call-widget.asciidoc[]
9+
* Add a small, non-timestamped dataset to {es} using Elasticsearch REST APIs.
10+
* Run basic searches.
3911

4012
[discrete]
4113
[[add-data]]
4214
=== Add data
4315

44-
You add data to {es} as JSON objects called documents. {es} stores these
16+
You add data to {es} as JSON objects called documents.
17+
{es} stores these
4518
documents in searchable indices.
4619

4720
[discrete]
@@ -58,6 +31,13 @@ The request automatically creates the index.
5831
PUT books
5932
----
6033
// TESTSETUP
34+
35+
[source,console]
36+
--------------------------------------------------
37+
DELETE books
38+
--------------------------------------------------
39+
// TEARDOWN
40+
6141
////
6242

6343
[source,console]
@@ -236,10 +216,11 @@ JSON object submitted during indexing.
236216
[[qs-match-query]]
237217
==== `match` query
238218

239-
You can use the `match` query to search for documents that contain a specific value in a specific field.
219+
You can use the <<query-dsl-match-query,`match` query>> to search for documents that contain a specific value in a specific field.
240220
This is the standard query for performing full-text search, including fuzzy matching and phrase searches.
241221

242222
Run the following command to search the `books` index for documents containing `brave` in the `name` field:
223+
243224
[source,console]
244225
----
245226
GET books/_search
@@ -251,34 +232,4 @@ GET books/_search
251232
}
252233
}
253234
----
254-
// TEST[continued]
255-
256-
[discrete]
257-
[[whats-next]]
258-
=== Next steps
259-
260-
Now that {es} is up and running and you've learned the basics, you'll probably want to test out larger datasets, or index your own data.
261-
262-
[discrete]
263-
[[whats-next-search-learn-more]]
264-
==== Learn more about search queries
265-
266-
* <<search-with-elasticsearch>>. Jump here to learn about exact value search, full-text search, vector search, and more, using the <<search-search,search API>>.
267-
268-
[discrete]
269-
[[whats-next-more-data]]
270-
==== Add more data
271-
272-
* Learn how to {kibana-ref}/sample-data.html[install sample data] using {kib}. This is a quick way to test out {es} on larger workloads.
273-
* Learn how to use the {kibana-ref}/connect-to-elasticsearch.html#upload-data-kibana[upload data UI] in {kib} to add your own CSV, TSV, or JSON files.
274-
* Use the https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html[bulk API] to ingest your own datasets to {es}.
275-
276-
[discrete]
277-
[[whats-next-client-libraries]]
278-
==== {es} programming language clients
279-
280-
* Check out our https://www.elastic.co/guide/en/elasticsearch/client/index.html[client library] to work with your {es} instance in your preferred programming language.
281-
* If you're using Python, check out https://www.elastic.co/search-labs[Elastic Search Labs] for a range of examples that use the {es} Python client. This is the best place to explore AI-powered search use cases, such as working with embeddings, vector search, and retrieval augmented generation (RAG).
282-
** This extensive, hands-on https://www.elastic.co/search-labs/tutorials/search-tutorial/welcome[tutorial]
283-
walks you through building a complete search solution with {es}, from the ground up.
284-
** https://github.com/elastic/elasticsearch-labs[`elasticsearch-labs`] contains a range of executable Python https://github.com/elastic/elasticsearch-labs/tree/main/notebooks[notebooks] and https://github.com/elastic/elasticsearch-labs/tree/main/example-apps[example apps].
235+
// TEST[continued]
Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
[[quickstart]]
2-
= Quickstart
2+
= Quick starts
33

4-
Get started quickly with {es}.
4+
Use these quick starts to get hands-on experience with the {es} APIs.
5+
Unless otherwise noted, these examples will use queries written in <<query-dsl,Query DSL>> syntax.
56

6-
* Learn how to run {es} (and {kib}) for <<run-elasticsearch-locally,local development>>.
7-
* Follow our <<getting-started,Quickstart guide>> to add data to {es} and query it.
7+
[discrete]
8+
[[quickstart-requirements]]
9+
== Requirements
810

9-
include::run-elasticsearch-locally.asciidoc[]
10-
include::getting-started.asciidoc[]
11+
You'll need a running {es} cluster, together with {kib} to use the Dev Tools API Console.
12+
Get started <<run-elasticsearch-locally,locally in Docker>> , or see our <<elasticsearch-intro-deploy,other deployment options>>.
13+
14+
[discrete]
15+
[[quickstart-list]]
16+
== Hands-on quick starts
17+
18+
* <<getting-started,Basics: Add data using APIs>>. Learn how to add data to {es} and perform basic searches.
19+
20+
[discrete]
21+
[[quickstart-python-links]]
22+
== Working in Python
23+
24+
If you're interested in using {es} with Python, check out Elastic Search Labs:
25+
26+
* https://github.com/elastic/elasticsearch-labs[`elasticsearch-labs` repository]: Contains a range of Python https://github.com/elastic/elasticsearch-labs/tree/main/notebooks[notebooks] and https://github.com/elastic/elasticsearch-labs/tree/main/example-apps[example apps].
27+
* https://www.elastic.co/search-labs/tutorials/search-tutorial/welcome[Tutorial]: This walks you through building a complete search solution with {es} from the ground up using Flask.
28+
29+
include::getting-started.asciidoc[]

docs/reference/quickstart/run-elasticsearch-locally.asciidoc renamed to docs/reference/run-elasticsearch-locally.asciidoc

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
11
[[run-elasticsearch-locally]]
2-
== Run {es} locally in Docker (without security)
2+
== Run {es} locally in Docker
33
++++
4-
<titleabbrev>Local dev setup (Docker)</titleabbrev>
4+
<titleabbrev>Run {es} locally</titleabbrev>
55
++++
66

77
[WARNING]
88
====
99
*DO NOT USE THESE INSTRUCTIONS FOR PRODUCTION DEPLOYMENTS*
1010
1111
The instructions on this page are for *local development only*. Do not use these instructions for production deployments, because they are not secure.
12-
While this approach is convenient for experimenting and learning, you should never run the service in this way in a production environment.
12+
While this approach is convenient for experimenting and learning, you should never run Elasticsearch in this way in a production environment.
1313
====
1414

15-
The following commands help you very quickly spin up a single-node {es} cluster, together with {kib} in Docker.
16-
Note that if you don't need the {kib} UI, you can skip those instructions.
15+
Follow this tutorial if you want to quickly set up {es} in Docker for local development or testing.
1716

18-
[discrete]
19-
[[local-dev-why]]
20-
=== When would I use this setup?
21-
22-
Use this setup if you want to quickly spin up {es} (and {kib}) for local development or testing.
23-
24-
For example you might:
25-
26-
* Want to run a quick test to see how a feature works.
27-
* Follow a tutorial or guide that requires an {es} cluster, like our <<getting-started,quick start guide>>.
28-
* Experiment with the {es} APIs using different tools, like the Dev Tools Console, cURL, or an Elastic programming language client.
29-
* Quickly spin up an {es} cluster to test an executable https://github.com/elastic/elasticsearch-labs/tree/main/notebooks#readme[Python notebook] locally.
17+
This tutorial also includes instructions for installing {kib}.
18+
If you don't need access to the {kib} UI, then you can skip those instructions.
3019

3120
[discrete]
3221
[[local-dev-prerequisites]]
@@ -118,12 +107,12 @@ When you access {kib}, use `elastic` as the username and the password you set ea
118107

119108
[NOTE]
120109
====
121-
The service is started with a trial license. The trial license enables all features of Elasticsearch for a trial period of 30 days. After the trial period expires, the license is downgraded to a basic license, which is free forever. If you prefer to skip the trial and use the basic license, set the value of the `xpack.license.self_generated.type` variable to basic instead. For a detailed feature comparison between the different licenses, refer to our https://www.elastic.co/subscriptions[subscriptions page].
110+
The service is started with a trial license. The trial license enables all features of Elasticsearch for a trial period of 30 days. After the trial period expires, the license is downgraded to a basic license, which is free forever.
122111
====
123112

124113
[discrete]
125114
[[local-dev-connecting-clients]]
126-
== Connecting to {es} with language clients
115+
=== Connect to {es} with language clients
127116

128117
To connect to the {es} cluster from a language client, you can use basic authentication with the `elastic` username and the password you set in the environment variable.
129118

@@ -172,12 +161,11 @@ curl -u elastic:$ELASTIC_PASSWORD \
172161
[[local-dev-next-steps]]
173162
=== Next steps
174163

175-
Use our <<getting-started,quick start guide>> to learn the basics of {es}: how to add data and query it.
164+
Use our <<quickstart,quick start guides>> to learn the basics of {es}.
176165

177166
[discrete]
178167
[[local-dev-production]]
179168
=== Moving to production
180169

181-
This setup is not suitable for production use. For production deployments, we recommend using our managed service on Elastic Cloud. https://cloud.elastic.co/registration[Sign up for a free trial] (no credit card required).
182-
183-
Otherwise, refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html[Install {es}] to learn about the various options for installing {es} in a self-managed production environment, including using Docker.
170+
This setup is not suitable for production use.
171+
Refer to <<elasticsearch-intro-deploy, deployment options>> for more information.

docs/reference/setup.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ the only resource-intensive application on the host or container. For example,
2727
you might run {metricbeat} alongside {es} for cluster statistics, but a
2828
resource-heavy {ls} deployment should be on its own host.
2929

30+
include::run-elasticsearch-locally.asciidoc[]
31+
3032
include::setup/install.asciidoc[]
3133

3234
include::setup/configuration.asciidoc[]

docs/reference/tab-widgets/api-call.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// tag::cloud[]
2-
**Use {kib}**
2+
**Option 1: Use {kib}**
33

44
//tag::kibana-api-ex[]
55
. Open {kib}'s main menu ("*☰*" near Elastic logo) and go to **Dev Tools > Console**.
@@ -16,17 +16,17 @@ GET /
1616
1717
//end::kibana-api-ex[]
1818
19-
**Use curl**
19+
**Option 2: Use `curl`**
2020
21-
To communicate with {es} using curl or another client, you need your cluster's
21+
To communicate with {es} using `curl` or another client, you need your cluster's
2222
endpoint.
2323
2424
. Open {kib}'s main menu and click **Manage this deployment**.
2525
2626
. From your deployment menu, go to the **Elasticsearch** page. Click **Copy
2727
endpoint**.
2828
29-
. To submit an example API request, run the following curl command in a new
29+
. To submit an example API request, run the following `curl` command in a new
3030
terminal session. Replace `<password>` with the password for the `elastic` user.
3131
Replace `<elasticsearch_endpoint>` with your endpoint.
3232
+

0 commit comments

Comments
 (0)