elasticsearch笔记

1.测试 Elasticsearch 是否启动成功,可以打开另一个终端,执行以下操作: 

[root@192.168.127.134 bin]#curl 'http://localhost:9200/?pretty'
{
  "name" : "node-1",
  "cluster_name" : "elasticsearch-cluster",
  "cluster_uuid" : "5_rNIFRDR2Siz7p1OBzfHQ",
  "version" : {
    "number" : "6.4.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "04711c2",
    "build_date" : "2018-09-26T13:34:09.098244Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

2.查看集群健康状态 

[root@192.168.127.134 ~]#curl localhost:9200/_cluster/health
{"cluster_name":"elasticsearch-cluster","status":"green","timed_out":false,"number_of_nodes":2,"number_of_data_nodes":2,"active_primary_shards":0,"active_shards":0,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}

3.查看集群master信息 

[root@192.168.127.134 ~]#curl localhost:9200/_cat/master?v
id                     host            ip              node
WJcro7CCSY2lGDWDFr4s_A 192.168.127.134 192.168.127.134 node-1

4.列出所有索引 

curl localhost:9200/_cat/indices

5.删除索引megacorp 

curl -X DELETE localhost:9200/megacorp

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值