Error in pipeline aggregation

Trying to run below request but getting error:
/prof_dc44f7ef-d590-44bc-8845-3f1cf82bc521/_search Post
{
"aggregations": {
"Frequency": {
"terms": {
"field": "gender",
"size": 2147483647,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_key": "asc"
}
]
},
"aggregations": {
"count": {
"value_count": {}
}
}
},
"extended_stats_bucket": {
"extended_stats_bucket": {
"buckets_path": [
"Frequency>count"
],
"gap_policy": "skip",
"sigma": 3
}
}
}
}

Error:

"root_cause": [
{
"type": "illegal_state_exception",
"reason": "value source config is invalid; must have either a field context or a script or marked as unwrapped"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "345196a2-4194-43e8-8e17-dd3aad7469c6",
"node": "wIszR4kjRYyxjPudM6BXbg",
"reason": {
"type": "illegal_state_exception",
"reason": "value source config is invalid; must have either a field context or a script or marked as unwrapped"
}
}
],
"caused_by": {
"type": "illegal_state_exception",
"reason": "value source config is invalid; must have either a field context or a script or marked as unwrapped",
"caused_by": {
"type": "illegal_state_exception",
"reason": "value source config is invalid; must have either a field context or a script or marked as unwrapped"
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.