cheun 发表于 2019-1-29 09:42:05

elasticsearch索引只读解决办法

  执行一下命令,修改索引可写
  curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete":null}'
  删除索引
  curl -H'Content-Type:application/json' -d'{"query":{"range":{"pt":{"lt":"now-1d","format":"epoch_millis"}}}}' -XPOST "http://127.0.0.1:9200/*/_delete_by_query?conflicts=proceed"
  释放空间
  curl -XPOST 'http://127.0.0.1:9200/_forcemerge?only_expunge_deletes=true&max_num_segments=1'



页: [1]
查看完整版本: elasticsearch索引只读解决办法