我有重新索引脚本的问题,我不知道我的问题在哪里,
curl -k -uelastic:"password" -H 'Content-Type:application/json' -XPOST localhost:9200/_reindex?pretty -d'{
"source":
{
"remote":
{
"host": "http://10.0.1.3:9200",
"username": "elastic",
"password": "password"
}
"index": "$n"
}
"dest":
{
"index": "$n"
}
}'
在执行脚本时,我有以下错误:
{ "error" : {
"root_cause" : [
{
"type" : "x_content_parse_exception",
"reason" : "[10:10] Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 10, column: 10]"
}
],
"type" : "x_content_parse_exception",
"reason" : "[9:7] [reindex] failed to parse field [source]",
"caused_by" : {
"type" : "x_content_parse_exception",
"reason" : "[10:10] Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 10, column: 10]",
"caused_by" : {
"type" : "json_parse_exception",
"reason" : "Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 10, column: 10]"
}
} }, "status" : 400
我找不到这样的:“对我来说,一切都应该很好。
1条答案
按热度按时间tjrkku2a1#
你少了一个逗号