# Can't change analyzer for \_all field

**URL:** <https://discuss.elastic.co/t/cant-change-analyzer-for-all-field/121982>\
**Category:** Elasticsearch\
**Created:** [March 1, 2018, 5:42am UTC](https://discuss.elastic.co/t/cant-change-analyzer-for-all-field/121982 "2018-03-01T05:42:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaisharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaisharma/32/22833_2.png) [@jaisharma](https://discuss.elastic.co/u/jaisharma)\
**Post date:** [March 1, 2018, 5:42am UTC](https://discuss.elastic.co/t/cant-change-analyzer-for-all-field/121982/1 "2018-03-01T05:42:01Z")

</div>

ES=2.4.0  
My configuration in elasticsearch.yml has default analyzer : keyword

```
index.analysis.analyzer.default.type: keyword

```

Now i've a field which stores notes and thus i want to analyze only this particular field. Thus i'm doing:

```
PUT /index10?pretty
{
  "mappings": {
    "my_type": {
      "properties": {
        "Notes_field": {
          "type": "string",
          "analyzer": "standard"
        }
      }
    }
  }
}

```

Now when i try to index my document, i get the error:

```
Document contains at least one immense term in field=\"_all\"

```

So i went back and corrected my mapping to make \_all analyzed explicitly (as it might be using the default keyword analyzer):

```
PUT /index10?pretty
{
  "mappings": {
    "my_type": {
      "properties": {
        "Notes_field": {
          "type": "string",
          "analyzer": "standard"
        }
      }
    }
  },
  "_all": {
    "analyzer": "standard"
  }
}

```

But upon indexing, i get the same error as mentioned above. What am i doing wrong?

Please note that i don't want to disable the \_all field. Also i don't want to exclude the Notes\_fields from \_all.

---

<div class="post-metadata">

**Author:** ![jaisharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaisharma/32/22833_2.png) [@jaisharma](https://discuss.elastic.co/u/jaisharma)\
**Post date:** [March 1, 2018, 5:58am UTC](https://discuss.elastic.co/t/cant-change-analyzer-for-all-field/121982/2 "2018-03-01T05:58:47Z")

</div>

The issue was with the way i was putting mappings. \_all has to be at the same level as properties while i kept it at the level of mappings.

This seems like a validation issue to me, \_all settings should have a json structure validation to ensure people don't have to do this by trial and error.

---

<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:** [March 29, 2018, 5:59am UTC](https://discuss.elastic.co/t/cant-change-analyzer-for-all-field/121982/3 "2018-03-29T05:59:03Z")

</div>

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