Fix index-level settings by moving them from elasticsearch.yml to an index template

This commit is contained in:
Andreas Düren
2025-03-16 18:01:07 +01:00
parent efd6c2b05d
commit c2301bb8bb
2 changed files with 63 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ xpack.security.authc.password_hashing.algorithm: bcrypt
# ----------------------------------- Memory ----------------------------------
# Memory locking to prevent swapping
bootstrap.memory_lock: true
bootstrap.memory_lock: false
# ---------------------------------- HTTP/REST API ---------------------------
http.cors.enabled: true
@@ -58,15 +58,18 @@ thread_pool.search.queue_size: 1000
# I/O optimization
bootstrap.system_call_filter: false
# Default index settings
index.number_of_shards: 1
index.number_of_replicas: 0
# ---------------------------------- Index Templates ---------------------------
# Instead of setting index settings directly (which is not allowed),
# we configure index templates that will be applied to new indices.
# Elasticsearch will automatically apply these templates to new indices.
# Merge settings for better indexing performance
index.merge.scheduler.max_thread_count: 1
index.merge.policy.floor_segment: 2mb
index.merge.policy.max_merge_at_once: 4
index.merge.policy.segments_per_tier: 8
# The following settings MUST be removed from this file:
# - index.number_of_shards
# - index.number_of_replicas
# - index.merge.scheduler.max_thread_count
# - index.merge.policy.floor_segment
# - index.merge.policy.max_merge_at_once
# - index.merge.policy.segments_per_tier
# Set processors based on container configuration
processors: ${PROCESSORS:1}