# Index template pattern error

**URL:** <https://discuss.elastic.co/t/index-template-pattern-error/309351>\
**Category:** Elasticsearch\
**Created:** [July 11, 2022, 5:58pm UTC](https://discuss.elastic.co/t/index-template-pattern-error/309351 "2022-07-11T17:58:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thuunder7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thuunder7/32/97482_2.png) [@Thuunder7](https://discuss.elastic.co/u/Thuunder7)\
**Post date:** [July 11, 2022, 5:58pm UTC](https://discuss.elastic.co/t/index-template-pattern-error/309351/1 "2022-07-11T17:58:36Z")

</div>

Hi guys,

I am trying to create a new index template but for some reason elasticsearch is assuming that there is already one index template with the index pattern requested...

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "index template [my-test-app-env-eaisg] has index patterns [my-testv3-app-*-eaisg-*, my-testv4-app-*-eaisg-*] matching patterns from existing templates [my-test-app-env-eaisap] with patterns (my-test-app-env-eaisap => [my-testv3-app-*-eaisap-*, my-testv4-app-*-eaisap-*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "index template [my-test-app-env-eaisg] has index patterns [my-testv3-app-*-eaisg-*, my-testv4-app-*-eaisg-*] matching patterns from existing templates [my-test-app-env-eaisap] with patterns (my-test-app-env-eaisap => [my-testv3-app-*-eaisap-*, my-testv4-app-*-eaisap-*]) that have the same priority [0], multiple index templates may not match during index creation, please use a different priority"
  },
  "status" : 400
}

```

As you can see above, both index templates have different index patterns, so im a bit confused on why it doesnt allow me to create this index template.

Do you have any ideia why is this happening?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 8, 2022, 5:59pm UTC](https://discuss.elastic.co/t/index-template-pattern-error/309351/2 "2022-08-08T17:59:05Z")

</div>

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