es - elasticsearch mapping - parameters - meta

94 阅读1分钟

世界上并没有完美的程序,但是我们并不因此而沮丧,因为写程序就是一个不断追求完美的过程。

问 :meta有什么特点?
答 :
在这里插入图片描述
问 :meta如何使用?
答 :

# meta
PUT /meta_test
{
  "mappings" : {
    "properties" : {
      "name" : {
        "type"   : "keyword",
        "meta"   : {
          "class" : "app1"
        }
      }
    }
  }
}

# 查看元数据
GET /meta_test/_mapping/

# 结果
{
  "meta_test" : {
    "mappings" : {
      "properties" : {
        "name" : {
          "type" : "keyword",
          "meta" : {
            "class" : "app1"
          }
        }
      }
    }
  }
}