elasticsearch
Posted anjuncc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearch相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章