Field mapping with "index":"no" causes error (ES2.0)


This might be a n00bie error, but I have a mapping of:

"mappings": {
    "myindex": {
        "properties": {
            "json": {
                "type": "string",
                "index": "no"

I want to store the 'json' field but do not need to search on it. Looking at the docs here: Mapping | Elasticsearch: The Definitive Guide [2.x] | Elastic

Then as I understand it, I should be able to use "no" as a value for "index", however, this causes an error of:

org.elasticsearch.index.mapper.MapperParsingException: wrong value for index [false] for field [json]

I definitely have "no" in the field not false as shown in the message. I've tried "not_analyzed" and that works fine. I've also tried "false" but that gives the same error. I've also tried using a different field name in case 'json' is a reserved field but that didn't make a difference.

Thanks for any thoughts :slight_smile:

It looks like a bug to me. Can you create a full recreation script?

Same issue here. Create a json file with index: no for some fields. Then:

# curl -XPUT http://localhost:9200/foobar_index/ -d @./foobar_index.config.json
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [roles] has unsupported parameters:  [index : no]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [foobar_type]: Mapping definition for [roles] has unsupported parameters:  [index : no]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [roles] has unsupported parameters:  [index : no]"}},"status":400}

This is on elasticsearch-2.2.0

1 Like

Getting the same error. Do we have any fix for this?