Tag Archives: Es create index error

ElasticSearch Create Index Error: mapper_parsing_exception Root mapping definition has unsupported parameters

elasticsearch version number: 5.6.14. This error has something to do with the ES version. You’d better explain the version number first so that some readers will not be invalid after operating according to my method

error mapping statement 1:

{
    "test_0904": {
        "mappings": {
            "user": {
                "properties": {
                    "birthday": {
                        "type": "date",
                        "store": true
                    },
                    "hobby": {
                        "type": "text",
                        "store": true
                    },
                    "id": {
                        "type": "long",
                        "store": true
                    },
                    "name": {
                        "type": "text",
                        "store": true
                    }
                }
            }
        }
    }
}

error mapping statement 2:

{
    "mappings": {
        "user": {
            "properties": {
                "birthday": {
                    "type": "date",
                    "store": true
                },
                "hobby": {
                    "type": "text",
                    "store": true
                },
                "id": {
                    "type": "long",
                    "store": true
                },
                "name": {
                    "type": "text",
                    "store": true
                }
            }
        }
    }
}

modified mapping statement:

{
    "properties": {
        "birthday": {
            "type": "date",
            "store": true
        },
        "hobby": {
            "type": "text",
            "store": true
        },
        "id": {
            "type": "long",
            "store": true
        },
        "name": {
            "type": "text",
            "store": true
        }
    }
}

To sum up, there are some differences in the structure of mapping statements supported by various versions of ES. Different versions have different statement writing methods. Some versions of parameters support and some versions do not support.