Skip to content

Commit 3ee45a3

Browse files
jrodewigdebadair
andauthored
[DOCS] Refactor quick start guide and README (#71331) (#71937)
Changes: * Refactors the "Getting Started" content down to one page. * Refactors the README to reduce duplicated content and better mirror Kibana's. * Focuses the quick start on time series data, including data streams and runtime fields. * Streamlines self-managed install instructions to Docker. Co-authored-by: debadair <debadair@elastic.co>
1 parent 53842a2 commit 3ee45a3

12 files changed

+726
-2836
lines changed

README.asciidoc

Lines changed: 56 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -1,205 +1,51 @@
11
= Elasticsearch
22

3-
== A Distributed RESTful Search Engine
3+
Elasticsearch is the distributed, RESTful search and analytics engine at the
4+
heart of the https://www.elastic.co/products[Elastic Stack]. You can use
5+
Elasticsearch to store, search, and manage data for:
46

5-
=== https://www.elastic.co/products/elasticsearch[https://www.elastic.co/products/elasticsearch]
7+
* Logs
8+
* Metrics
9+
* A search backend
10+
* Application monitoring
11+
* Endpoint security
612
7-
Elasticsearch is a distributed RESTful search engine built for the cloud. Features include:
13+
\... and more!
814

9-
* Distributed and Highly Available Search Engine.
10-
** Each index is fully sharded with a configurable number of shards.
11-
** Each shard can have one or more replicas.
12-
** Read / Search operations performed on any of the replica shards.
13-
* Multi-tenant.
14-
** Support for more than one index.
15-
** Index level configuration (number of shards, index storage, etc.).
16-
* Various set of APIs
17-
** HTTP RESTful API
18-
** All APIs perform automatic node operation rerouting.
19-
* Document oriented
20-
** No need for upfront schema definition.
21-
** Schema can be defined for customization of the indexing process.
22-
* Reliable, Asynchronous Write Behind for long term persistency.
23-
* Near real-time search.
24-
* Built on top of Apache Lucene
25-
** Each shard is a fully functional Lucene index
26-
** All the power of Lucene easily exposed through simple configuration and plugins.
27-
* Per operation consistency
28-
** Single document-level operations are atomic, consistent, isolated, and durable.
15+
To learn more about Elasticsearch's features and capabilities, see our
16+
https://www.elastic.co/products/elasticsearch[product page].
2917

30-
== Getting Started
18+
[[get-started]]
19+
== Get started
3120

32-
First of all, DON'T PANIC. It will take 5 minutes to get the gist of what Elasticsearch is all about.
21+
The simplest way to set up Elasticsearch is to create a managed deployment with
22+
https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic
23+
Cloud].
3324

34-
=== Installation
25+
If you prefer to install and manage Elasticsearch yourself, you can download
26+
the latest version from
27+
https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].
3528

36-
* https://www.elastic.co/downloads/elasticsearch[Download] and unpack the Elasticsearch official distribution.
37-
* Run `bin/elasticsearch` on Linux or macOS. Run `bin\elasticsearch.bat` on Windows.
38-
* Run `curl -X GET http://localhost:9200/` to verify Elasticsearch is running.
29+
For more installation options, see the
30+
https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html[Elasticsearch installation
31+
documentation].
3932

40-
For more options, see
41-
https://www.elastic.co/guide/en/elasticsearch/reference/current/starting-elasticsearch.html[Starting
42-
Elasticsearch].
33+
[[upgrade]]
34+
== Upgrade
4335

44-
=== Indexing
36+
To upgrade from an earlier version of Elasticsearch, see the
37+
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html[Elasticsearch upgrade
38+
documentation].
4539

46-
First, index some sample JSON documents. The first request automatically creates
47-
the `my-index-000001` index.
48-
49-
----
50-
curl -X POST 'http://localhost:9200/my-index-000001/_doc?pretty' -H 'Content-Type: application/json' -d '
51-
{
52-
"@timestamp": "2099-11-15T13:12:00",
53-
"message": "GET /search HTTP/1.1 200 1070000",
54-
"user": {
55-
"id": "kimchy"
56-
}
57-
}'
58-
59-
curl -X POST 'http://localhost:9200/my-index-000001/_doc?pretty' -H 'Content-Type: application/json' -d '
60-
{
61-
"@timestamp": "2099-11-15T14:12:12",
62-
"message": "GET /search HTTP/1.1 200 1070000",
63-
"user": {
64-
"id": "elkbee"
65-
}
66-
}'
67-
68-
curl -X POST 'http://localhost:9200/my-index-000001/_doc?pretty' -H 'Content-Type: application/json' -d '
69-
{
70-
"@timestamp": "2099-11-15T01:46:38",
71-
"message": "GET /search HTTP/1.1 200 1070000",
72-
"user": {
73-
"id": "elkbee"
74-
}
75-
}'
76-
----
77-
78-
=== Search
79-
80-
Next, use a search request to find any documents with a `user.id` of `kimchy`.
81-
82-
----
83-
curl -X GET 'http://localhost:9200/my-index-000001/_search?q=user.id:kimchy&pretty=true'
84-
----
85-
86-
Instead of a query string, you can use Elasticsearch's
87-
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html[Query
88-
DSL] in the request body.
89-
90-
----
91-
curl -X GET 'http://localhost:9200/my-index-000001/_search?pretty=true' -H 'Content-Type: application/json' -d '
92-
{
93-
"query" : {
94-
"match" : { "user.id": "kimchy" }
95-
}
96-
}'
97-
----
98-
99-
You can also retrieve all documents in `my-index-000001`.
100-
101-
----
102-
curl -X GET 'http://localhost:9200/my-index-000001/_search?pretty=true' -H 'Content-Type: application/json' -d '
103-
{
104-
"query" : {
105-
"match_all" : {}
106-
}
107-
}'
108-
----
109-
110-
During indexing, Elasticsearch automatically mapped the `@timestamp` field as a
111-
date. This lets you run a range search.
112-
113-
----
114-
curl -X GET 'http://localhost:9200/my-index-000001/_search?pretty=true' -H 'Content-Type: application/json' -d '
115-
{
116-
"query" : {
117-
"range" : {
118-
"@timestamp": {
119-
"from": "2099-11-15T13:00:00",
120-
"to": "2099-11-15T14:00:00"
121-
}
122-
}
123-
}
124-
}'
125-
----
126-
127-
=== Multiple indices
128-
129-
Elasticsearch supports multiple indices. The previous examples used an index
130-
called `my-index-000001`. You can create another index, `my-index-000002`, to
131-
store additional data when `my-index-000001` reaches a certain age or size. You
132-
can also use separate indices to store different types of data.
133-
134-
You can configure each index differently. The following request
135-
creates `my-index-000002` with two primary shards rather than the default of
136-
one. This may be helpful for larger indices.
137-
138-
----
139-
curl -X PUT 'http://localhost:9200/my-index-000002?pretty' -H 'Content-Type: application/json' -d '
140-
{
141-
"settings" : {
142-
"index.number_of_shards" : 2
143-
}
144-
}'
145-
----
146-
147-
You can then add a document to `my-index-000002`.
148-
149-
----
150-
curl -X POST 'http://localhost:9200/my-index-000002/_doc?pretty' -H 'Content-Type: application/json' -d '
151-
{
152-
"@timestamp": "2099-11-16T13:12:00",
153-
"message": "GET /search HTTP/1.1 200 1070000",
154-
"user": {
155-
"id": "kimchy"
156-
}
157-
}'
158-
----
159-
160-
You can search and perform other operations on multiple indices with a single
161-
request. The following request searches `my-index-000001` and `my-index-000002`.
162-
163-
----
164-
curl -X GET 'http://localhost:9200/my-index-000001,my-index-000002/_search?pretty=true' -H 'Content-Type: application/json' -d '
165-
{
166-
"query" : {
167-
"match_all" : {}
168-
}
169-
}'
170-
----
171-
172-
You can omit the index from the request path to search all indices.
173-
174-
----
175-
curl -X GET 'http://localhost:9200/_search?pretty=true' -H 'Content-Type: application/json' -d '
176-
{
177-
"query" : {
178-
"match_all" : {}
179-
}
180-
}'
181-
----
182-
183-
=== Distributed, highly available
184-
185-
Let's face it; things will fail...
186-
187-
Elasticsearch is a highly available and distributed search engine. Each index is broken down into shards, and each shard can have one or more replicas. By default, an index is created with 1 shard and 1 replica per shard (1/1). Many topologies can be used, including 1/10 (improve search performance) or 20/1 (improve indexing performance, with search executed in a MapReduce fashion across shards).
188-
189-
To play with the distributed nature of Elasticsearch, bring more nodes up and shut down nodes. The system will continue to serve requests (ensure you use the correct HTTP port) with the latest data indexed.
190-
191-
=== Where to go from here?
192-
193-
We have just covered a tiny portion of what Elasticsearch is all about. For more information, please refer to the https://www.elastic.co/products/elasticsearch[elastic.co] website. General questions can be asked on the https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[on Slack]. The Elasticsearch GitHub repository is reserved for bug reports and feature requests only.
194-
195-
=== Building from source
40+
[[build-source]]
41+
== Build from source
19642

19743
Elasticsearch uses https://gradle.org[Gradle] for its build system.
19844

199-
To build a distribution for your local OS and print its output location upon
45+
To build a distribution for your local OS and print its output location upon
20046
completion, run:
20147
----
202-
./gradlew localDistro
48+
./gradlew localDistro
20349
----
20450

20551
To build a distribution for another platform, run the related command:
@@ -214,10 +60,31 @@ To build distributions for all supported platforms, run:
21460
./gradlew assemble
21561
----
21662

217-
Finished distributions are output to `distributions/archives`.
63+
Distributions are output to `distributions/archives`.
64+
65+
To run the test suite, see xref:TESTING.asciidoc[TESTING].
66+
67+
[[docs]]
68+
== Documentation
69+
70+
For the complete Elasticsearch documentation visit
71+
https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html[elastic.co].
72+
73+
For information about our documentation processes, see the
74+
xref:docs/README.asciidoc[docs README].
75+
76+
[[contribute]]
77+
== Contribute
78+
79+
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
21880

219-
See the xref:TESTING.asciidoc[TESTING] for more information about running the Elasticsearch test suite.
81+
[[questions]]
82+
== Questions? Problems? Suggestions?
22083

221-
=== Upgrading from older Elasticsearch versions
84+
* To report a bug or request a feature, create a
85+
https://github.com/elastic/elasticsearch/issues/new/choose[GitHub Issue]. Please
86+
ensure someone else hasn't created an issue for the same topic.
22287

223-
To ensure a smooth upgrade process from earlier versions of Elasticsearch, please see our https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html[upgrade documentation] for more details on the upgrade process.
88+
* Need help using Elasticsearch? Reach out on the
89+
https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[Slack]. A
90+
fellow community member or Elastic engineer will be happy to help you out.

docs/build.gradle

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -372,36 +372,6 @@ buildRestTests.setups['user_hits'] = '''
372372
{"index":{}}
373373
{"timestamp": "2019-01-03T13:00:00", "user_id": "4"}'''
374374

375-
376-
// Fake bank account data used by getting-started.asciidoc
377-
buildRestTests.setups['bank'] = '''
378-
- do:
379-
indices.create:
380-
index: bank
381-
body:
382-
settings:
383-
number_of_shards: 5
384-
number_of_routing_shards: 5
385-
- do:
386-
bulk:
387-
index: bank
388-
refresh: true
389-
body: |
390-
#bank_data#
391-
'''
392-
/* Load the actual accounts only if we're going to use them. This complicates
393-
* dependency checking but that is a small price to pay for not building a
394-
* 400kb string every time we start the build. */
395-
File accountsFile = new File("$projectDir/src/test/resources/accounts.json")
396-
buildRestTests.inputs.file(accountsFile)
397-
buildRestTests.doFirst {
398-
String accounts = accountsFile.getText('UTF-8')
399-
// Indent like a yaml test needs
400-
accounts = accounts.replaceAll('(?m)^', ' ')
401-
buildRestTests.setups['bank'] =
402-
buildRestTests.setups['bank'].replace('#bank_data#', accounts)
403-
}
404-
405375
// Used by sampler and diversified-sampler aggregation docs
406376
buildRestTests.setups['stackoverflow'] = '''
407377
- do:

0 commit comments

Comments
 (0)