查询

curl -u USER:PASS http://IP:9200/INDEXNAME/_search -d '{
  "query": {
    "match_all": {}
  }
}'| python -m json.tool

删除索引

  • help doc https://www.elastic.co/guide/cn/elasticsearch/guide/current/_deleting_an_index.html

  • 删除一个索引编辑

DELETE /my_index
  • 可以这样删除多个索引:
DELETE /index_one,index_two
DELETE /index_*
  • 甚至可以这样删除 全部 索引:
DELETE /_all
DELETE /*
  • action.destructive_requires_name: true #这个设置使删除只限于特定名称指向的数据,

elasticsearch的plugin使用

  • 安装
sudo bin/elasticsearch-plugin install [plugin_name]
  • 查看列表
sudo bin/elasticsearch-plugin list
  • 卸载
sudo bin/elasticsearch-plugin remove [pluginname]