码迷,mamicode.com
首页 > 其他好文 > 详细

elasticsearch

时间:2016-09-20 21:15:06      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

curl ‘localhost:9200/_cat/health?v‘
curl ‘localhost:9200/_cat/nodes?v‘
curl ‘localhost:9200/_cat/indices?v‘

curl -XPUT ‘localhost:9200/customer?pretty‘
curl -XPUT ‘localhost:9200/customer/external/1?pretty‘ -d ‘
{
  "name": "John Doe"
}‘
curl -XGET ‘localhost:9200/customer/external/1?pretty‘
curl -XDELETE ‘localhost:9200/customer?pretty‘

curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>
//put 替换或新增
curl -XPUT ‘localhost:9200/customer/external/1?pretty‘ -d ‘
{
  "name": "John Doe"
}‘
/post _update 更新
curl -XPOST ‘localhost:9200/customer/external/1/_update?pretty‘ -d ‘
{
  "doc": { "name": "Jane Doe" }
}‘
curl -XPOST ‘localhost:9200/customer/external/1/_update?pretty‘ -d ‘
{
  "script" : "ctx._source.age += 5"
}‘

elasticsearch

标签:

原文地址:http://www.cnblogs.com/anjuncc/p/5890362.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!