1、_source(true/false)
_source默认开启,是否存储原数据,设置false则不存储。
# 关闭source存储(不存原数据)
PUT zzx-company-001
{
"mappings": {
"_source": {
"enabled": false
},
"properties": {
"company01": {
"type": "text"
},
"company02": {
"type": "integer"
},
"company03": {
"type": "text"
}
}
}
}
DELETE zzx-company-001
2、includes/excludes 包含与排除字段
includes中的字段会被存储原数据,excludes中的字段不会被存储原数据
PUT zzx-company-001
{
"mappings": {
"_source": {
"includes":["company01","company02"],
"excludes":["company03"]
},
"properties": {
"company01": {
"t