OS: #1 SMP Debian 4.19.152-1 (2020-10-18)
Install elastic by this tutorial https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html:
{
"name" : "web",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "HSeOQvkHRey2P_JN2Nv-GA",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
How globally change some index creation options https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html?
Such as index.max_ngram_diff
as example?
2
Answers
You need to use the index update settings API:
If you want this setting to be applied on index that are going to be created in the future, you can create an index template that will be applied to the matching future indexes:
After that, every time that you create a new index whose name matches
my-index-*
, that new index will get the settings set in the template.I will recommend to use Index templates for this. You can preconfigure template with settings you need, and use on index creation.