Elasticsearch 7 Failed to parse value [analyzed] as only [true] or [false] are allowed.

创建mapping,包含下面内容

 "peoductDesc" : {
          "type": "text",
          "index": "analyzed"
        }

以前都是用的ES5,现在转成ES7,在创建mapping的时候报下面错误

Failed to parse value [analyzed] as only [true] or [false] are allowed.

 

原因:现在index这个只能用true或者false了,如果想要不被分词就把数据类型设置为keyword!!!

 

你可能感兴趣的:(java)