0

EDIT: Answer below

getting always following error when trying any aggregated query.

Tried googling and different aggregation constructs. Elasticsearch API Hosted as "Logs Data Platform" by OVH.

Request

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

Error response

{
    "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
}
MortalFool
  • 1,065
  • 2
  • 14
  • 26

1 Answers1

0

Stupid me ... size=0 was missing in the query parameter.

MortalFool
  • 1,065
  • 2
  • 14
  • 26