Skip to content

Commit 02c993c

Browse files
committed
fix: correct json extension for sample ecommerce data
Signed-off-by: hainenber <[email protected]>
1 parent d91e281 commit 02c993c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

_getting-started/ingest-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,32 @@ Use the following steps to create a sample index and define field mappings for t
5050
```
5151
{% include copy.html %}
5252

53-
1. Download [ecommerce.json](https://github.com/opensearch-project/documentation-website/blob/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.json). This file contains the index data formatted so that it can be ingested by the Bulk API:
53+
1. Download [ecommerce.ndjson](https://github.com/opensearch-project/documentation-website/blob/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.ndjson). This file contains the index data formatted so that it can be ingested by the Bulk API:
5454

5555
To use cURL, send the following request:
5656

5757
```bash
58-
curl -O https://raw.githubusercontent.com/opensearch-project/documentation-website/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.json
58+
curl -O https://raw.githubusercontent.com/opensearch-project/documentation-website/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.ndjson
5959
```
6060
{% include copy.html %}
6161

6262
To use wget, send the following request:
6363

6464
```
65-
wget https://raw.githubusercontent.com/opensearch-project/documentation-website/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.json
65+
wget https://raw.githubusercontent.com/opensearch-project/documentation-website/{{site.opensearch_major_minor_version}}/assets/examples/ecommerce.ndjson
6666
```
6767
{% include copy.html %}
6868

6969
1. Define the field mappings provided in the mapping file:
7070
```bash
71-
curl -H "Content-Type: application/x-ndjson" -X PUT "https://localhost:9200/ecommerce" -ku admin:<custom-admin-password> --data-binary "@ecommerce-field_mappings.json"
71+
curl -H "Content-Type: application/json" -X PUT "https://localhost:9200/ecommerce" -ku admin:<custom-admin-password> --data-binary "@ecommerce-field_mappings.json"
7272
```
7373
{% include copy.html %}
7474

7575
1. Upload the documents using the Bulk API:
7676

7777
```bash
78-
curl -H "Content-Type: application/x-ndjson" -X PUT "https://localhost:9200/ecommerce/_bulk" -ku admin:<custom-admin-password> --data-binary "@ecommerce.json"
78+
curl -H "Content-Type: application/x-ndjson" -X PUT "https://localhost:9200/ecommerce/_bulk" -ku admin:<custom-admin-password> --data-binary "@ecommerce.ndjson"
7979
```
8080
{% include copy.html %}
8181

_install-and-configure/upgrade-opensearch/appendix/rolling-upgrade-lab.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ This section can be broken down into two parts:
169169
{% include copy.html %}
170170
1. Next, download the bulk data that you will ingest into this index:
171171
```bash
172-
wget https://raw.githubusercontent.com/opensearch-project/documentation-website/main/assets/examples/ecommerce.json
172+
wget https://raw.githubusercontent.com/opensearch-project/documentation-website/main/assets/examples/ecommerce.ndjson
173173
```
174174
{% include copy.html %}
175175
1. Use the [Create index]({{site.url}}{{site.baseurl}}/api-reference/index-apis/create-index/) API to create an index using the mappings defined in `ecommerce-field_mappings.json`:
176176
```bash
177-
curl -H "Content-Type: application/x-ndjson" \
177+
curl -H "Content-Type: application/json" \
178178
-X PUT "https://localhost:9201/ecommerce?pretty" \
179179
--data-binary "@ecommerce-field_mappings.json" \
180180
-ku admin:<custom-admin-password>
@@ -188,11 +188,11 @@ This section can be broken down into two parts:
188188
"index" : "ecommerce"
189189
}
190190
```
191-
1. Use the [Bulk]({{site.url}}{{site.baseurl}}/api-reference/document-apis/bulk/) API to add data to the new ecommerce index from `ecommerce.json`:
191+
1. Use the [Bulk]({{site.url}}{{site.baseurl}}/api-reference/document-apis/bulk/) API to add data to the new ecommerce index from `ecommerce.ndjson`:
192192
```bash
193193
curl -H "Content-Type: application/x-ndjson" \
194194
-X PUT "https://localhost:9201/ecommerce/_bulk?pretty" \
195-
--data-binary "@ecommerce.json" \
195+
--data-binary "@ecommerce.ndjson" \
196196
-ku admin:<custom-admin-password>
197197
```
198198
{% include copy.html %}
File renamed without changes.

0 commit comments

Comments
 (0)