# Specifying default custom analyzer

**URL:** <https://discuss.elastic.co/t/specifying-default-custom-analyzer/97587>\
**Category:** Elasticsearch\
**Created:** [August 18, 2017, 1:05pm UTC](https://discuss.elastic.co/t/specifying-default-custom-analyzer/97587 "2017-08-18T13:05:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gchen](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gchen](https://discuss.elastic.co/u/gchen)\
**Post date:** [August 18, 2017, 1:05pm UTC](https://discuss.elastic.co/t/specifying-default-custom-analyzer/97587/1 "2017-08-18T13:05:59Z")

</div>

Hi,

I'm working on upgrading out cluster to newer ES version. one of the template mapping that used to work on the old version doesn't work on the newer version.

I checked the document, there no mention that this behavior was changed in newer ES versions. One web posting that i came across suggest that I name my default custom analyzer 'standard' to override the standard. I haven't try that out yet. What is the correct way of defining default analyzer for an index?

template mapping:

```json
{
    "mappings": {
        "analyzer": "custom_csv_lowercase",
        "my_doc_type": {
            "_all": {
                "enabled": false
            },
            "properties": {
                "my_field": {
                    "type": "string",
                    "analyzer": "custom_csv_lowercase"
                }
            }
        }
    },
    "order": 1,
    "settings": {
        "analysis": {
            "analyzer": {
                "custom_csv_lowercase": {
                    "filter": ["lowercase"],
                    "tokenizer": "commas",
                    "type": "custom"
                }
            },
            "tokenizer": {
                "commas": {
                    "pattern": ",+",
                    "type": "pattern"
                }
            }
        }
    }
}

```

Error i'm getting when i try to push the template to ES:

```auto
{
  "status": 400,
  "error": {
    "caused_by": {
      "reason": "Root mapping definition has unsupported parameters: [analyzer : custom_csv_lowercase]",
      "type": "mapper_parsing_exception"
    },
    "reason": "Failed to parse mapping [my_doc_type]: Root mapping definition has unsupported parameters: [analyzer : custom_csv_lowercase]",
    "type": "mapper_parsing_exception",
    "root_cause": [
      {
        "reason": "Root mapping definition has unsupported parameters: [analyzer : custom_csv_lowercase]",
        "type": "mapper_parsing_exception"
      }
    ]
  }
}

```

Thanks,  
GC

---

<div class="post-metadata">

**Author:** ![gchen](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gchen](https://discuss.elastic.co/u/gchen)\
**Post date:** [August 22, 2017, 2:58pm UTC](https://discuss.elastic.co/t/specifying-default-custom-analyzer/97587/2 "2017-08-22T14:58:11Z")

</div>

answering my own question again. the way to do it is to name the analyzer 'default'.

---

<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:** [September 19, 2017, 2:58pm UTC](https://discuss.elastic.co/t/specifying-default-custom-analyzer/97587/3 "2017-09-19T14:58:18Z")

</div>

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