您需要将标题中的内容类型设置为application / json:
curl -XPOST -H "Content-Type: application/json" "http://localhost:9200/shakespeare/_bulk?pretty" --data-binary @D:\data\shakespeare.json