# Error creating index template after migrating to ES 6

**URL:** <https://discuss.elastic.co/t/error-creating-index-template-after-migrating-to-es-6/140395>\
**Category:** Elasticsearch\
**Created:** [July 17, 2018, 8:59pm UTC](https://discuss.elastic.co/t/error-creating-index-template-after-migrating-to-es-6/140395 "2018-07-17T20:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexvollmer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexvollmer/32/27381_2.png) [@alexvollmer](https://discuss.elastic.co/u/alexvollmer)\
**Post date:** [July 17, 2018, 8:59pm UTC](https://discuss.elastic.co/t/error-creating-index-template-after-migrating-to-es-6/140395/1 "2018-07-17T20:59:02Z")

</div>

We're attempting to migrate from Elasticsearch 5.6.6 to the latest (6.3.1). In doing so we can no longer create the index template we use. When I attempt to do so I get this error:

```

[2018-07-17T20:54:06,310][WARN][r.suppressed] path: /_template/news-development-template, params: {name=news-development-template}
org.elasticsearch.common.settings.SettingsException: Failed to load settings from [{"index":{"analysis":{"filter":{"url_filter_without_protocol":{"type":"pattern_capture","preserve_original":false,"flags":"CASE_INSENSITIVE","patterns":["(?:https?://)?(?:www.)?([^:\n]+)"]}},"analyzer":{"proper_noun_analyzer":{"filter":[{"type":"stop","stopwords":"_english_"}],"tokenizer":"classic"},"url_analyzer":{"tokenizer":"uax_url_email"},"url_analyzer_without_protocol":{"type":"custom","tokenizer":"keyword","filter":["url_filter_without_protocol"]}}},"number_of_shards":1,"number_of_replicas":0},"index.mapper.dynamic":false}]
	at org.elasticsearch.common.settings.Settings$Builder.loadFromSource(Settings.java:1151) ~[elasticsearch-6.1.4.jar:6.1.4]

Caused by: java.lang.IllegalStateException: only value lists are allowed in serialized settings
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:715) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:704) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:704) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:704) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:704) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:673) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings.access$500(Settings.java:82) ~[elasticsearch-6.1.4.jar:6.1.4]
	at org.elasticsearch.common.settings.Settings$Builder.loadFromSource(Settings.java:1149) ~[elasticsearch-6.1.4.jar:6.1.4]
	... 52 more

```

Our index template looks like this:

```

{
  "index_patterns": [
    "news-development-*"
  ],
  "version": 12,
  "aliases": {
    "news-development": {
    }
  },
  "settings": {
    "index": {
      "analysis": {
        "filter": {
          "url_filter_without_protocol": {
            "type": "pattern_capture",
            "preserve_original": false,
            "flags": "CASE_INSENSITIVE",
            "patterns": [
              "(?:https?://)?(?:www.)?([^:\n]+)"
            ]
          }
        },
        "analyzer": {
          "proper_noun_analyzer": {
            "filter": [
              {
                "type": "stop",
                "stopwords": "_english_"
              }
            ],
            "tokenizer": "classic"
          },
          "url_analyzer": {
            "tokenizer": "uax_url_email"
          },
          "url_analyzer_without_protocol": {
            "type": "custom",
            "tokenizer": "keyword",
            "filter": [
              "url_filter_without_protocol"
            ]
          }
        }
      },
      "number_of_shards": 1,
      "number_of_replicas": 0
    },
    "index.mapper.dynamic": false
  },
  "mappings": {
    "item": {
      "properties": {
        "title": {
          "type": "text",
          "analyzer": "proper_noun_analyzer",
          "fields": {
            "case_insensitive": {
              "type": "text",
              "analyzer": "standard"
            }
          }
        },
        "content": {
          "properties": {
            "raw": {
              "type": "text"
            },
            "raw_content_length": {
              "type": "integer"
            },
            "stripped": {
              "type": "text",
              "analyzer": "proper_noun_analyzer"
            },
            "stripped_content_length": {
              "type": "integer"
            }
          }
        },
        "entities": {
          "type": "nested",
          "properties": {
            "name": {
              "type": "text"
            },
            "type": {
              "type": "keyword"
            },
            "occurrence": {
              "type": "float"
            }
          }
        },
        "links": {
          "properties": {
            "text": {
              "type": "text"
            },
            "href": {
              "type": "text",
              "analyzer": "url_analyzer_without_protocol"
            }
          }
        },
        "source_url": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "feed_url": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "sitemap_url": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword"
            }
          }
        },
        "website_url": {
          "type": "keyword"
        },
        "event_type": {
          "type": "keyword"
        },
        "feed_type": {
          "type": "keyword"
        },
        "source_type": {
          "type": "keyword"
        },
        "document_id": {
          "type": "keyword"
        },
        "published_at": {
          "type": "date"
        },
        "requested_at": {
          "type": "date"
        },
        "company_ids": {
          "type": "keyword"
        }
      },
      "_meta": {
        "version": 12
      }
    }
  }
}

```

If I remove the `analysis` section, as well as any reference to those custom analyzers, the index template will create successfully. AFAICT the analysis section is correct, but something is clearly not working correctly here, or we've missed a change required for the upgrade.

Any help is much appreciated.

---

<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 14, 2018, 8:59pm UTC](https://discuss.elastic.co/t/error-creating-index-template-after-migrating-to-es-6/140395/2 "2018-08-14T20:59:05Z")

</div>

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