使用curl进行索引重命名失败

时间:2017-12-05 09:54:59

标签: elasticsearch

我尝试使用引用enter link description here重命名我的索引 我以这种方式运行intructions:

    curl -XPOST '<ip>:9200/ -H 'Content-Type: application/json' -d'    
    {
       "source": {
         "index": "app_access_446"
       },
       "dest": {
         "index": "app_access_447"
       }
    }
    '

但我得到了这个回复

   {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid version format: -H CONTENT-TYPE: HTTP/1.1"}],"type":"illegal_argument_exception","reason":"invalid version format: -H CONTENT-TYPE: HTTP/1.1"},"status":400}curl: (3) [globbing] nested braces not supported at pos 36

我做错了什么?

问候niesel

1 个答案:

答案 0 :(得分:0)

curl -XPOST '<ip>:9200/_reindex' -H 'Content-Type: application/json' -d'    
{
   "source": {
     "index": "app_access_446"
   },
   "dest": {
     "index": "app_access_447"
   }
}
'