elasticsearch 使用Postman创建ElasticSearch索引时出错,elasticsearch,postman,elasticsearch-6,elasticsearch,Postman,Elasticsearch 6" /> elasticsearch 使用Postman创建ElasticSearch索引时出错,elasticsearch,postman,elasticsearch-6,elasticsearch,Postman,Elasticsearch 6" />

elasticsearch 使用Postman创建ElasticSearch索引时出错

elasticsearch 使用Postman创建ElasticSearch索引时出错,elasticsearch,postman,elasticsearch-6,elasticsearch,Postman,Elasticsearch 6,我正在尝试使用官方javascript客户端创建一个带有映射的elasticsearch索引。当我尝试在没有索引的情况下创建时,一切都进行得很顺利,但在创建索引时,我遇到了一个错误 这是我的模式: { "mappings":{ "post":{ "properties":{ "city":{ "type": "text" },

我正在尝试使用官方javascript客户端创建一个带有映射的elasticsearch索引。当我尝试在没有索引的情况下创建时,一切都进行得很顺利,但在创建索引时,我遇到了一个错误

这是我的模式:

    {
    "mappings":{
        "post":{
            "properties":{
                "city":{
                    "type": "text"
                },
                "contact_email":{
                    "type": "text"
                },
                "country":{
                    "type": "text"
                },
                "description":{
                    "type": "text"
                },
                "image":{
                    "type": "text"
                },
                "post_id":{
                    "type": "text"
                },
                "state_province":{
                    "type": "text"
                },
                "title":{
                    "type": "text"
                },
                "user_id":{
                    "type": "text"
                }
            }
        }
    }
}
当我执行上述命令时,我得到以下错误:

{
    "error": {
        "root_cause": [
            {
                "type": "mapper_parsing_exception",
                "reason": "Root mapping definition has unsupported parameters:  [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]"
            }
        ],
        "type": "mapper_parsing_exception",
        "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]",
        "caused_by": {
            "type": "mapper_parsing_exception",
            "reason": "Root mapping definition has unsupported parameters:  [post : {properties={country={type=text}, image={type=text}, post_id={type=text}, city={type=text}, user_id={type=text}, description={type=text}, state_province={type=text}, title={type=text}, contact_email={type=text}}}]"
        }
    },
    "status": 400
}

您使用的是哪个版本的ES u?如果您已完成映射,请参阅文档(您的特定版本)。一般来说,弹性搜索有很多突破性的变化,在我看来这是一个巨大的痛点。版本6@OpsterESNinja-阿米特