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

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐