Can't change analyzer for _all field

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.

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.

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