mapper [categoryName] if different type, current_type [text], merged_type [keyword]报错解决
在使用spring-boot-starter-data-elasticsearch依赖对elasticsearch进行查询时会报这个错误。
这是由于我之前加入elasticsearch数据后,再去对xxinfo
文件进行修改后运行引起的。
嵌套异常为java.lang.IllegalArgumentException:不同类型的映射器[categoryName],当前类型[text],合并的类型[keyword]
解决方法:
将elasticsearch中的数据删除后再重新导入就解决了