错误消息-无法过滤min_docs_count

时间:2019-07-05 14:45:04

标签: elasticsearch ovh

编辑: 在下面回答

尝试任何汇总查询时始终出现错误。

尝试使用谷歌搜索和不同的聚合构造。 OVH将Elasticsearch API托管为“日志数据平台”。

请求

{
    "aggs" : {
        "servers" : {
            "filter" : { "term": { "servertype": "1"  } },
            "aggs" : {
                "avg_price" : { "avg" : { "field" : "serveramount" } }
            }
        }
    }
}

错误响应

{
    "error": {
        "root_cause": [
            {
                "type": "parse_exception",
                "reason": "Unable to filter min_docs_count"
            }
        ],
        "type": "parse_exception",
        "reason": "Unable to filter min_docs_count",
        "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "[size] parameter cannot be negative, found [-1]"
        }
    },
    "status": 400
}

1 个答案:

答案 0 :(得分:0)

愚蠢的我...查询参数中缺少size = 0。