ELK

16.Elasticsearch显示映射

2022-04-12  本文已影响0人  大勇任卷舒

16.1 Explicit mapping

PUT /my-index-000001
{
  "mappings": {
    "properties": {
      "age": { "type": "integer" }, 
      "email": { "type": "keyword" }, 
      "name": { "type": "text" } 
    }
  }
}
PUT /my-index-000001/_mapping
{
  "properties": {
    "employee-id": {
      "type": "keyword",
      "index": false
    }
  }
}

16.2 查看映射

GET /my-index-000001/_mapping
{
  "my-index-000001" : {
    "mappings" : {
      "properties" : {
        "age" : {
          "type" : "integer"
        },
        "email" : {
          "type" : "keyword"
          },
        "employee-id" : {
          "type" : "keyword",
            "index" : false
          },
          "name" : {
            "type" : "text"
          }
        }
      }
    }
}
GET /my-index-000001/_mapping/field/employee-id
{
  "my-index-000001" : {
    "mappings" : {
      "employee-id" : {
        "full_name" : "employee-id",
        "mapping" : {
          "employee-id" : {
            "type" : "keyword",
            "index" : false
          } 
        }
      }
    }
  }
}

大数据视频推荐:
腾讯课堂
CSDN
ELK入门精讲
AIOps智能运维实战
ELK7 stack开发运维
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

上一篇下一篇

猜你喜欢

热点阅读