Caused by: ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Roo

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

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

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

import org.elasticsearch.client.indices.CreateIndexRequest;

测试成功

 创建的DSL的索引库

 以上解决办法参考

Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [properties]_司马缸砸光。的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/m0_59281987/article/details/131935694