Skip to content

创建索引

PUT /user
PUT /user

创建成功返回

{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "user"
}
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "user"
}

重复创建返回

{
  "error" : {
    "root_cause" : [
      {
        "type" : "resource_already_exists_exception",
        "reason" : "index [user/uT3rebrgTUuFQd0sERL7Dw] already exists",
        "index_uuid" : "uT3rebrgTUuFQd0sERL7Dw",
        "index" : "user"
      }
    ],
    "type" : "resource_already_exists_exception",
    "reason" : "index [user/uT3rebrgTUuFQd0sERL7Dw] already exists",
    "index_uuid" : "uT3rebrgTUuFQd0sERL7Dw",
    "index" : "user"
  },
  "status" : 400
}
{
  "error" : {
    "root_cause" : [
      {
        "type" : "resource_already_exists_exception",
        "reason" : "index [user/uT3rebrgTUuFQd0sERL7Dw] already exists",
        "index_uuid" : "uT3rebrgTUuFQd0sERL7Dw",
        "index" : "user"
      }
    ],
    "type" : "resource_already_exists_exception",
    "reason" : "index [user/uT3rebrgTUuFQd0sERL7Dw] already exists",
    "index_uuid" : "uT3rebrgTUuFQd0sERL7Dw",
    "index" : "user"
  },
  "status" : 400
}

备案号:冀ICP备20015584号-2