es创建索引库报错 :Types cannot be provided in put mapping requests, unless the include_type_na

es创建索引库报错 :Types cannot be provided in put mapping requests, unless the include_type_na
强烈推介IDEA2021.1.3破解激活,IntelliJ IDEA 注册码,2021.1.3IDEA 激活码  

大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说es创建索引库报错 :Types cannot be provided in put mapping requests, unless the include_type_na,希望能够帮助大家进步!!!

这个是因为elasticsearch7.0 之后不支持type导致的…

原因是由于写法是低版本的elasticsearch的,高版本要求传入一个include_type_name参数,值为true。所以加上一个参数即可。如下:

PUT /grid_cell/_mapping/grid_cell_0?include_type_name=true

 

本文来源huayang183,由架构君转载发布,观点不代表Java架构师必看的立场,转载请标明来源出处:https://javajgs.com/archives/18303

发表评论