//设置mapping

Put: http://192.168.1.102:9200/indexName

{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  },
  "mappings": {
    "typeName": {
      "properties": {
        "sno": {
          "type": "string"
        },
        "sname": {
          "type": "string",
          "index": "not_analyzed"
        }
      }
    }
  }
}

//返回
{
    "acknowledged": true
}

 

//修改mapping

Put: http://192.168.1.102:9200/indexName/typeName/_mapping/

{
  "typeName": {
    "properties": {
      "sno": {
        "type": "string",
        "index": "not_analyzed"
      }
    }
  }
}


{
    "acknowledged": true
}

 

相关文章:

  • 2021-12-12
  • 2021-11-25
  • 2022-02-15
  • 2021-06-06
  • 2022-12-23
  • 2022-01-16
  • 2021-06-13
猜你喜欢
  • 2021-10-09
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
相关资源
相似解决方案