wind版本elasticdump执行报错 unexpected token ‘ in json at

wind版本elasticdump执行报错 unexpected token ‘ in json at_第1张图片

输入的格式不对:

之前,json格式不对:

elasticdump --input=http://***:9200/d_*_news, --output=/home/zyyt/es_data_bak/0714.json --searchBody='{"query":{"bool":{"must":[{"term":{"language":{"value":"简体中文","boost":1}}},{"term":{"country":{"value":"阿富汗"}}},{"terms":{"columnUrl":["https://boxun.com/"]}}],"adjust_pure_negative":true,"boost":1}}}' --limit=1000

修改为:json前后没有单引号,以及json内容的双引号的斜杆

elasticdump --input=http://***:9200/d_*_news, --output=/home/zyyt/es_data_bak/0714.json --searchBody {\"query\":{\"bool\":{\"must\":[{\"term\":{\"language\":{\"value\":\"简体中文\",\"boost\":1}}},{\"term\":{\"country\":{\"value\":\"阿富汗\"}}},{\"terms\":{\"columnUrl\":[\"https://boxun.com/\"]}}],\"adjust_pure_negative\":true,\"boost\":1}}} --limit=1000

你可能感兴趣的:(json,java,数据库)