创建索引
curl -XPUT 'http://localhost:9200/twitter'
提交数据
curl -H "Content-Type: application/json" -XPUT -s 'http://localhost:9200/twitter/tweet/1' -d '{
"user" : "alex",
"post_date" : "2019-07-15T14:12:12",
"message" : "trying out Elastic Search"
}'
查询
curl -XGET -s 'http://localhost:9200/twitter/tweet/1'