Error in script fields

Hi ,
why i can't get the result of the script :

GET /test_bookings_v2/_search?size=0
{
"script_fields": {
"avg_price": {
"script": {
"lang": "expression",
"source": "doc['price'].avg()"
}
}
}

}

Capture

i use ELK :7.7.0
any help please i want to use this field in my visualization.

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