Index template - exclude index seems not working

Hi everybody.

I dont find the correct syntax to exclude one index of an index pattern in index template

2 index template :slight_smile:

1st

{
  "order": 0,
  "index_patterns": [
	"*_*","-tdir_business_prod-*"
  ],
  "settings": {
		"index.lifecycle.name": "Hot_toWarm_toCold_policy",
		"index.refresh_interval": "60s",
	  "index.number_of_shards": 1,
	  "index.number_of_replicas": 1
		}
  }

2nd

{
  "order": 1,
  "index_patterns": [
	"tdir_business_prod-*"
  ],
  "settings": {
	  "index.lifecycle.name": "Hot_toWarm_toCold_policy",
	  "index.refresh_interval": "60s",
	  "index.number_of_shards": 3,
	  "index.number_of_replicas": 1

		}
  }

In the first one i want to exclude : -tdir_business_prod-* to create the other indices with 1 primary shard and 1 replica

In the second for tdir_business_prod-*, i would like to create this index with 3 primaries shards and 1 replica

It's sure i make a mistake but i dont find which one ? :slight_smile:

I change the order but KO too

this one should have only 1 shard

tdir_apr_business_prod-2023.04.27": {
		"settings": {
			"index.blocks.write": "true",
			"index.creation_date": "1682583561555",
			"index.creation_date_string": "2023-04-27T08:19:21.555Z",
			"index.lifecycle.name": "Hot_toWarm_toCold_policy",
			"index.number_of_replicas": "1",
			"index.number_of_shards": "3",
"tdir_business_prod-2023.04.27": {
		"settings": {
			"index.blocks.write": "true",
			"index.creation_date": "1682583560986",
			"index.creation_date_string": "2023-04-27T08:19:20.986Z",
			"index.lifecycle.name": "Hot_toWarm_toCold_policy",
			"index.number_of_replicas": "1",
			"index.number_of_shards": "3",

It seems that the template with order 1 is only apply ? :frowning:

Could you help me please :wink: An idea where is my mistake ?

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.