You can specify the index.aggr_perf_batch_size configuration item to enable or disable batch import optimization. After the batch import function is enabled, documents in bulk requests are written in batches. This function reduces the overhead of memory application, application lock, and other calls, improving data import performance.
The value range of index.aggr_perf_batch_size is [1, Integer.MAX_VALUE]. The default value is 1, indicating that the batch import function is disabled. If the value is greater than 1, the batch import function is enabled and the value of MIN(bulk_doc_size, aggr_perf_batch_size) indicates the batch size.
PUT my_index { "settings": { "index.aggr_perf_batch_size": "128" } }