bulk数据之前将refresh_interval disable

curl -u elastic:'1111' -X PUT 'http://1111:9200/index_name/_settings' -H 'Content-Type: application/json' -d '{"index":{"refresh_interval":"-1"}}'

bulk 后启用

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

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐