当前位置: > 其它学习 > Elasticsearch >

ElasticSearch增加Mapping字段

时间:2019-11-06 16:43来源:it 作者:it
2.3.x

PUT /pub_stock/_mapping/ES_PUB_Stock    mapping增加字段

{
  "properties": {
    "proRemark": {
      "type": "string",
      "index": "not_analyzed"
    }
  }
}

5.0.x

POST pub_stock/ES_PUB_Stock/_mapping 

{
  "properties": {
    "stockPrice": {
      "type": "nested",
      "properties": {
        "usdprice": {
          "type": "double",
          "index": "not_analyzed"
        }
      }
    }
  }
}

(责任编辑:IT)
------分隔线----------------------------