|
1 | | ---- |
2 | | -navigation_title: "Basics: Index and search using APIs" |
3 | | ---- |
| 1 | +# {{es}} API quickstart [getting-started] |
4 | 2 |
|
5 | | -# Index and search data using {{es}} APIs [getting-started] |
6 | 3 |
|
7 | | - |
8 | | -This quick start guide is a hands-on introduction to the fundamental concepts of Elasticsearch: [indices, documents and field type mappings](../../../manage-data/data-store/index-basics.md). |
| 4 | +This quick start guide is a hands-on introduction to the fundamental concepts of Elasticsearch: [indices, documents and field type mappings](../../manage-data/data-store/index-basics.md). |
9 | 5 |
|
10 | 6 | You’ll learn how to create an index, add data as documents, work with dynamic and explicit mappings, and perform your first basic searches. |
11 | 7 |
|
12 | 8 | ::::{tip} |
13 | | -The code examples in this tutorial are in [Console](../../../explore-analyze/query-filter/tools/console.md) syntax by default. You can [convert into other programming languages](../../../explore-analyze/query-filter/tools/console.md#import-export-console-requests) in the Console UI. |
| 9 | +The code examples in this tutorial are in [Console](../../explore-analyze/query-filter/tools/console.md) syntax by default. You can [convert into other programming languages](../../explore-analyze/query-filter/tools/console.md#import-export-console-requests) in the Console UI. |
14 | 10 |
|
15 | 11 | :::: |
16 | 12 |
|
17 | 13 |
|
18 | 14 |
|
19 | 15 | ## Requirements [getting-started-requirements] |
20 | 16 |
|
21 | | -You’ll need a running {{es}} cluster, together with {{kib}} to use the Dev Tools API Console. Run the following command in your terminal to set up a [single-node local cluster in Docker](../../../solutions/search/get-started.md): |
| 17 | +You’ll need a running {{es}} cluster, together with {{kib}} to use the Dev Tools API Console. Run the following command in your terminal to set up a [single-node local cluster in Docker](get-started.md): |
22 | 18 |
|
23 | 19 | ```sh |
24 | 20 | curl -fsSL https://elastic.co/start-local | sh |
@@ -51,7 +47,7 @@ The following response indicates the index was created successfully. |
51 | 47 | ## Step 2: Add data to your index [getting-started-add-documents] |
52 | 48 |
|
53 | 49 | ::::{tip} |
54 | | -This tutorial uses {{es}} APIs, but there are many other ways to [add data to {{es}}](../../../solutions/search/ingest-for-search.md). |
| 50 | +This tutorial uses {{es}} APIs, but there are many other ways to [add data to {{es}}](ingest-for-search.md). |
55 | 51 |
|
56 | 52 | :::: |
57 | 53 |
|
@@ -102,7 +98,7 @@ The response includes metadata that {{es}} generates for the document, including |
102 | 98 | 2. The `_id` field is the unique identifier for the document. |
103 | 99 | 3. The `_version` field indicates the version of the document. |
104 | 100 | 4. The `result` field indicates the result of the indexing operation. |
105 | | -5. The `_shards` field contains information about the number of [shards](../../../deploy-manage/index.md) that the indexing operation was executed on and the number that succeeded. |
| 101 | +5. The `_shards` field contains information about the number of [shards](../../deploy-manage/index.md) that the indexing operation was executed on and the number that succeeded. |
106 | 102 | 6. The `total` field indicates the total number of shards for the index. |
107 | 103 | 7. The `successful` field indicates the number of shards that the indexing operation was executed on. |
108 | 104 | 8. The `failed` field indicates the number of shards that failed during the indexing operation. *0* indicates no failures. |
@@ -230,7 +226,7 @@ You should receive a response indicating there were no errors. |
230 | 226 |
|
231 | 227 | ## Step 3: Define mappings and data types [getting-started-mappings-and-data-types] |
232 | 228 |
|
233 | | -[Mappings](../../../manage-data/data-store/index-basics.md#elasticsearch-intro-documents-fields-mappings) define how data is stored and indexed in {{es}}, like a schema in a relational database. |
| 229 | +[Mappings](../../manage-data/data-store/index-basics.md#elasticsearch-intro-documents-fields-mappings) define how data is stored and indexed in {{es}}, like a schema in a relational database. |
234 | 230 |
|
235 | 231 |
|
236 | 232 | ### Use dynamic mapping [getting-started-dynamic-mapping] |
@@ -348,12 +344,12 @@ PUT /my-explicit-mappings-books |
348 | 344 |
|
349 | 345 | Explicit mappings are defined at index creation, and documents must conform to these mappings. You can also use the [Update mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html). When an index has the `dynamic` flag set to `true`, you can add new fields to documents without updating the mapping. |
350 | 346 |
|
351 | | -This allows you to combine explicit and dynamic mappings. Learn more about [managing and updating mappings](../../../manage-data/data-store/mapping.md#mapping-manage-update). |
| 347 | +This allows you to combine explicit and dynamic mappings. Learn more about [managing and updating mappings](../../manage-data/data-store/mapping.md#mapping-manage-update). |
352 | 348 |
|
353 | 349 |
|
354 | 350 | ## Step 4: Search your index [getting-started-search-data] |
355 | 351 |
|
356 | | -Indexed documents are available for search in near real-time, using the [`_search` API](../../../solutions/search/querying-for-search.md). |
| 352 | +Indexed documents are available for search in near real-time, using the [`_search` API](querying-for-search.md). |
357 | 353 |
|
358 | 354 |
|
359 | 355 | ### Search all documents [getting-started-search-all-documents] |
|
0 commit comments