我正在尝试使用aws-es-curl向zs elasticsearch发送请求:
aws-es-curl https://myhost.es.amazonaws.com/my-index/_search?pretty -H 'Content-Type: application/json' -d'{"query":{"match_all":{}},"size": "100","index":"my-index", "_source": {"excludes": ["attachment.*","data"], "includes": "owner"}}'
但这会让我回归所有领域。此外,我也无法识别size
参数:(为什么会发生这种情况?如何将这些参数传递给es?
ES版本为5.3
来源变体是here
答案 0 :(得分:0)
尝试将查询内容传递给curl命令:
echo '{"query":{"match_all":{}},"size": "100", "_source": {"excludes": ["attachment.*","data"], "includes": "owner"}}' | aws-es-curl -X POST https://myhost.es.amazonaws.com/my-index/_search