ELK

12.Elasticsearch的操作

2022-03-28  本文已影响0人  大勇任卷舒

12.1 RMDB与elasticsearch

12.2 集群和节点健康

12.3 文档及元数据

12.4 检查文档是否存在

12.5 索引操作

12.6 更新文档

12.6.1 更新文档-例1

12.6.2 更新文档-例2

curl -X POST "localhost:9200/customer/_doc/1/_update?pretty" -H 'Content-Type: 
application/json' -d'
{
"script" : "ctx._source.age += 5"
}‘

12.6.3 删除文档

12.6.4 批处理-示例1

curl -X POST "localhost:9200/customer/_doc/_bulk?pretty" -H 
'Content-Type: application/json' -d'
{"index":{"_id":"1"}}
{"name": "John Doe" }
{"index":{"_id":"2"}}
{"name": "Jane Doe" }
'

12.6.5 批处理-示例2

curl -X POST "localhost:9200/customer/_doc/_bulk?pretty" -H 'Content-Type: 
application/json' -d'
{"update":{"_id":"1"}}
{"doc": { "name": "John Doe becomes Jane Doe" } }
{"delete":{"_id":"2"}}
'

大数据视频推荐:
腾讯课堂
CSDN
ELK入门精讲
AIOps智能运维实战
ELK7 stack开发运维
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

上一篇下一篇

猜你喜欢

热点阅读