试试搜索一下吧

报错 Cannot update enabled setting for [_source]

Elasticsearch | 作者 z_hong7 | 发布于2017年03月06日 | 阅读数:4125

设置_source "enabled": false,想只存储某一字段"store": true,结果报错,为什么不能自定义了
已邀请:

medcl - 今晚打老虎。

赞同来自:

完整的mapping 发一下看看吧,是可以禁用的
文档:https://www.elastic.co/guide/e ... .html

kennywu76 - Wood

赞同来自:

我在es5.x上试了一下,disable _source和再设置一个字段"store":true没有遇到任何问题。  网上搜了一下,在es2.0和2.1里有个bug可能导致关闭_source后update mapping报标题上的错误:
https://github.com/elastic/ela ... 15997
 
如果你用的是bug版本,那么绕过bug的办法是在update mapping的时候,带上_source设置项:


"_source": { "enabled": false }


 
 

 

要回复问题请先登录注册