Запрос оболочкиasticsearch не работает с строкой в кодировке base64
Версия ES: 5.2.3
Для кодирования я использовал base64:
char[] data = Base64Coder.encode(text.getBytes());
return data.ToString();
Примечание : текст - это подчеркнутый JSON-запрос.
запрос :
curl -d XPOST 'http://localhost:9200/entitymaster_qa_t4/_search' -d '{
"query" : {
"wrapper" : {
"query" : "W0NAMTZiN2MzYw=="
}
}
}'
Ответ:
{"error":{"root_cause":[{"type":"parse_exception","reason":"Failed to derive xcontent"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"entitymaster_qa_t4","node":"8WVaVr9ATmaqOPDHGpNyHw","reason":{"type":"parse_exception","reason":"Failed to derive xcontent"}}]},"status":400}