Uploading Shakespeare json to index in Kibana

Hi,

I am trying to upload the Shakespeare json into the Shakespeare index I created. From Kibana, I executed:
PUT /shakespeare
{
"mappings": {
"doc": {
"properties": {
"speaker": {"type": "keyword"},
"play_name": {"type": "keyword"},
"line_id": {"type": "integer"},
"speech_number": {"type": "integer"}
}
}
}
}

But, when I execute: curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json

or POST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json, it errors out.

I tried directly pasting the json POST /shakespeare/_bulk
{
...
}

But that errors out saying it's too big.

What's the right way to do this? Is there a command where I can reference the download link for the Shakespeare json?

Thanks!

The complete works of William Shakespeare, suitably parsed into fields. Download shakespeare.json .

PUT /shakespeare
{
 "mappings": {
  "doc": {
   "properties": {
    "speaker": {"type": "keyword"},
    "play_name": {"type": "keyword"},
    "line_id": {"type": "integer"},
    "speech_number": {"type": "integer"}
   }
  }
 }
}
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json

Follow: https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html

Else use sample data : https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html

Cheers
Rashmi

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.