elasticsearch其它一下日常操作

  1. 查看es表结构或者索引数据(按需使用)
    http://59.1.6.68:19200/kcap_km_docs/type_docs/_search?pretty
    http://12.12.12.125:9200/km/km_docs/_search?pretty
  2. 删除es索引数据
    curl -XDELETE ‘localhost:9200/km?pretty’
    curl -XDELETE ‘localhost:9200/kcap_km_docs?pretty’
    3.查看es索引库
    curl -XGET 127.0.0.1:9200/_cat/indices
    curl ‘localhost:9200/_cat/indices?v’
    4.查看es插件是否安装成功: curl http://localhost:9200/_cat/plugins
    elasticsearch其它一下日常操作
    5.解决elasticsearch超过10000条无法查询的问题
    针对当索引:
    curl -XPUT “http://10.4.44.131:9200/km/_settings” -d ‘{“index”:{“max_result_window”:1000000}}’
    全部生效:
    curl -XPUT http://es-ip:9200/_settings -d ‘{ “index” : { “max_result_window” : 100000000}}’
    第二种:在config/elasticsearch.yml文件中的最后加上index.max_result_window: 100000000,但是这种方法要注意在最前面加上空格
    但是要注意,5.x之后,已经不支持第二种方式了。否则启动时,会报下列错误:

elasticsearch其它一下日常操作