Postman创建Elasticsearch(2.4版本)索引

一、创建索引

  • 1、请求方式:PUT
  • 2、请求地址:地址 + 索引名
  • 3、请求数据
{
    
    
   "settings": {
    
    
       "number_of_shards": 3,
       "number_of_replicas": 2
   },
   "mappings": {
    
    
       "doc": {
    
    
           "dynamic": "false",
           "properties": {
    
    
               "id": {
    
    
                   "type": "long"
               },
               "type": {
    
    
                   "type": "long"
               },
               "tid": {
    
    
                   "type": "long"
               }
           }
       }
   }
}
  • 4、执行结果
    在这里插入图片描述

二、删除索引

  • 1、请求方式:DELETE
  • 2、请求地址:地址 + 索引名
  • 3、请求数据(无)
  • 4、执行结果
    在这里插入图片描述

三、其他

1、查看es信息

  • 查看信息 curl 1*2.11.*1.**50:9200

2、查看索引test信息

  • curl 1*2.11.*1.**50:9200/test/

3、test索引下mapping查看

  • curl 1*2.11.*1.**50:9200/test/_mapping

4、elasticsearch 2.2.1下载

猜你喜欢

转载自blog.csdn.net/qq_36025814/article/details/129453496