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

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/h_sn9999/article/details/102769040

创建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!!!

猜你喜欢

转载自blog.csdn.net/h_sn9999/article/details/102769040