Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [properties]: Root mapping definition has unsupported parameters:

 

我们在使用RestClient创建索引库时出现了这个错误。

可以检查一下 CreateIndexRequest 类型变量request 是否导入正确的包

有两个同名的包,我们选择:

import org.elasticsearch.client.indices.CreateIndexRequest;

创建的索引库DSL语法示例:

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐