1.创建索引
curl -XPUT localhost:9200/test
2.创建map
curl -XPUT localhost:9200/test/_mapping/item -d "{"item":{"properties":{"foo":{"type":"long"},"bar":{"type":"long"}}}}"
3.插入数据
curl -PUT localhost:9200/test/item -d {"foo":1989,"bar":1023}
4.根据id查数据
curl GET localhost:9200/test/item/1?pretty
5.全文检索
curl localhost:9200/test/item/_search -d {"query" : { "match_all": {}}}