ElasticSearch常规操作
ES REST API 风格接口
笔记参考
查看健康状态
GET /_cat/health?v
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1681284001 07:20:01 docker-cluster green 1 1 4 4 0 0 0 0 - 100.0%查看ES集群中的索引
GET /_cat/indices?v
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .apm-custom-link mEMoLqgkTbasghERbugo5g 1 0 0 0 208b 208b
green open .kibana_task_manager_1 dkEtqWUkQFe0TjIj4GeUJg 1 0 5 0 37.9kb 37.9kb
green open .apm-agent-configuration bjTtOoOfQZmvh9j5CHt9QA 1 0 0 0 208b 208b
green open .kibana_1 ZePVmaFiRDWrT2I70KB4Ag 1 0 87 3 145.9kb 145.9kb
yellow open test_index dqtYReLBSymyJwXy6cDDww 1 1 0 0 208b 208b
test_index yellow , 是因为只有一个节点, 主本和副本不能放同一个节点上创建索引
删除索引
新增员工(文档)
查询员工
修改员工(文档)
删除员工(文档)
批量查询
批量操作
例如:批量添加数据
Last updated