bulk数据之前将refresh_interval disable
bash
curl -u elastic:'1111' -X PUT 'http://1111:9200/index_name/_settings' -H 'Content-Type: application/json' -d '{"index":{"refresh_interval":"-1"}}'
bulk 后启用
bash
curl -u elastic:'1111' -X PUT 'http://1111:9200/index_name/_settings' -H 'Content-Type: application/json' -d '{"index":{"refresh_interval":"1s"}}'
https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed