mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
curl related doc changes in load dataset tutorial (#16040)
* curl related doc changes in load dataset tutorial * Correcting typo and incorporating review comments * Fixing new line issues and corrected example commands * Removing '#' as it seem to combine multiple lines * Update tutorial-load-dataset.asciidoc * Removing the template command * Remove `doc` path
This commit is contained in:
parent
079f97e328
commit
482cb4f603
1 changed files with 6 additions and 6 deletions
|
@ -160,15 +160,15 @@ At this point, you're ready to use the Elasticsearch {ref}/docs-bulk.html[bulk]
|
|||
API to load the data sets:
|
||||
|
||||
[source,shell]
|
||||
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json
|
||||
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
|
||||
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl
|
||||
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/bank/account/_bulk?pretty' --data-binary @accounts.json
|
||||
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
|
||||
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/_bulk?pretty' --data-binary @logs.jsonl
|
||||
|
||||
Or for Windows users, in Powershell:
|
||||
[source,shell]
|
||||
Invoke-RestMethod "http://localhost:9200/bank/account/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "accounts.json"
|
||||
Invoke-RestMethod "http://localhost:9200/shakespeare/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "shakespeare.json"
|
||||
Invoke-RestMethod "http://localhost:9200/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "logs.jsonl"
|
||||
Invoke-RestMethod "http://<host>:<port>/bank/account/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "accounts.json"
|
||||
Invoke-RestMethod "http://<host>:<port>/shakespeare/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "shakespeare.json"
|
||||
Invoke-RestMethod "http://<host>:<port>/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "logs.jsonl"
|
||||
|
||||
These commands might take some time to execute, depending on the available computing resources.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue