如何使用 ElasticSearch Rest 组件获取所有记录
.setBody(constant("{}"))
.toD("elasticsearch-rest://elasticsearch?operation=${bean:elasticOperation?method=choiceOperation}&indexName=${exchangeProperty.index}&useScroll=true")
其他查询成功
.setBody(constant("{\n" +
" \"query\": {\n" +
" \"match\": {\n" +
" \"_id\": \"XxmGZnoBhq--3N_vqvr5\"\n" +
" }\n" +
" }\n" +
" }"))
.toD("elasticsearch-rest://elasticsearch?operation=${bean:elasticOperation?method=choiceOperation}&indexName=${exchangeProperty.index}&useScroll=true")
例外是
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"query malformed, empty clause found at [1:2]"}],"type":"illegal_argument_exception","reason":"query malformed, empty clause found at [1:2]"},"status":400}