ElasticSearch:根映射定义具有不受支持的参数

时间:2018-03-24 01:12:38

标签: elasticsearch

我试图在Kibana中添加新的字段映射类别:

this.db.list('usernames', ref => ref.equalTo(uid)).remove() // Remove old value
this.db.list('usernames', ref => ref.equalTo(uid)).set(
  username, uid
) // Create new value

但后来我得到了答复:

PUT testcats/items/_mapping
{
    "settings": {
},
    "mappings": {
    "items" : {
        "_meta" : {
        "version" : "33"
        },
        "dynamic_templates" : [
        {
            "numbers" : {
            "match_mapping_type" : "long",
            "mapping" : {
                "type" : "double"
            }
            }
        },
        {
            "floats" : {
            "match_mapping_type" : "double",
            "mapping" : {
                "type" : "double"
            }
            }
        },
        {
            "strings" : {
            "match_mapping_type" : "string",
            "mapping" : {
                "fields" : {
                "raw" : {
                    "ignore_above" : 256,
                    "type" : "keyword"
                }
                },
                "type" : "text"
            }
            }
        }
        ],
        "properties" : {
        "categories": {
            "properties": {
            "audio": {
                "properties": {
                "category": {
                    "type": "text",
                    "fields": {
                    "raw": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                    }
                },
                "source": {
                    "type": "text",
                    "store": false,
                    "fields": {
                    "raw": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                    }
                }
                }
            },
            "user_generated": {
                "type" : "text",
                "fields" : {
                "raw" : {
                    "type" : "keyword",
                    "ignore_above": 256
                }
                },
                "copy_to" : [
                "all_search_data_items"
                ],
                "analyzer" : "autocomplete"
            },
            "visual": {
                "properties": {
                "category": {
                    "type": "text",
                    "fields": {
                    "raw": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                    }
                },
                "source": {
                    "type": "text",
                    "store": false,
                    "fields": {
                    "raw": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                    }
                }
                }
            }
            }
        }
        }
    }
    }
}

我一直在敲打这个问题。我无法确定哪个参数不受支持。任何帮助表示赞赏!另外,有没有办法从Kibana获取有关特定参数的更多细节不受支持?

1 个答案:

答案 0 :(得分:1)

仅尝试使用PUT testcats作为操作。您正在传递同样处于索引级别的设置,而不仅仅是在映射级别。