ElasticSearch实战(十四)-Mapping高级属性配置(常用作索引和数据分离)

        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
上一篇:ORM 框架简介


下一篇:论文翻译:2020_A Robust and Cascaded Acoustic Echo Cancellation Based on Deep Learning