The requested URL was not found on this server. 不管你信不信,反正我是没找到

ElasticSearch 6.2.3同义词配置报错

Elasticsearch | 作者 qiyao | 发布于2018年05月18日 | 阅读数:2672

Mapping从配置文件读取的:
"typename":{
    "properties": {
        "title": {
            "type": "text"
            "index": "analyzed"
            "analyzer": "by_max_word"
            "search_analyzer": "by_smart"
        }
    }
}

在配置好Mapping后,执行这个方法
IndexResponse response = client
.prepareIndex("myindex","custom")
.setSource(
jsonBuilder().startObject()
.field("title", "夜神了,番茄宫谁在写诗,已经有20年历史了")
.endObject()).get();
报错了:java.lang.IllegalArgumentException: Rejecting mapping update to [myindex] as the final mapping would have more than 1 type。
遇过这个问题的同学可以帮忙解答下该怎么解决么
已邀请:

Yu Tao

赞同来自:

elastisearch 在6的版本上面, 一个index, 只允许一个type,
它的报错是说,你在一个index上面 创建了多个type

要回复问题请先登录注册