【发布时间】:2019-01-12 22:07:49
【问题描述】:
{
"someindex": {
"aliases": {
"somealias": {}
},
"mappings": {},
"settings": {
"index": {
"number_of_shards": "5",
"provided_name": "someindex",
"creation_date": "1547325991414",
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": "1",
"max_gram": "20"
}
},
"normalizer": {
"lowerCaseNormalizer": {
"filter": [
"lowercase"
],
"type": "custom"
}
},
"analyzer": {
"standard": {
"filter": [
"lowercase",
"autocomplete_filter"
],
"type": "custom",
"tokenizer": "standard"
}
}
},
"number_of_replicas": "1",
"uuid": "9vrt0U90RWG-4MRQEIbj6w",
"version": {
"created": "6050499"
}
}
}
}
}
上面是我新创建的结构的结构。在我当前的设置中,我在当前索引上有一个名为 bookName 的属性,当前映射如下:
{
"bookName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256,
"normalizer": "lowerCaseNormalizer"
}
}
}
}
现在,当我尝试重新索引名为“someindex”的新索引并想为字段 bookName 插入新映射时,它给了我错误。”
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [mappings : {details={properties={suggest={type=completion}, bookName={type=text, analyzer=standard}}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [mappings : {details={properties={suggest={type=completion}, bookName={type=text, analyzer=standard}}}}]"
},
"status": 400
}
我已经尝试了所有方法,并且能够从头开始对随机数据进行测试。但是,我必须在我的项目中引入此功能,并且我已经准备好一个具有不同映射的弹性索引。移民让我很困扰。有人可以指导我如何实现这一目标的正确程序。
注意:我已经尝试了一切,搜索了 Elastic 文档和所有相关链接。我能够在新数据集上做到这一点,但迁移对我来说是真正的问题,因为我是这个领域的新手。
【问题讨论】:
-
您如何尝试更新新索引的映射?
-
什么时候出现错误?尝试更新映射或将文档编入索引时?
-
我在尝试将映射放入新创建的索引时遇到此错误。
标签: elasticsearch autocomplete mapping reindex search-suggestion