Hi !
i have some scripted field that i want to group in one document/field
here's an example of my scripts response:
{
"_index" : "data-index",
"_type" : "_doc",
"_id" : "661316070591028_3503977856324821",
"_score" : 3.1959937,
"fields" : {
"created_time" : [
"2021-01-10T16:30:00+0000"
],
"media_type" : [
"photo"
],
"sum" : [
62.0
]
}
}
i know that i can move my script to aggregation, but which one is there like a "container" that does do anything.
i want the response to look like this
[
{
"created_time" : [
"2021-01-10T16:30:00+0000"
],
"media_type" : [
"photo"
],
"sum" : [
62.0
]
},
{
"created_time" : [
"2021-01-10T16:30:00+0000"
],
"media_type" : [
"photo"
],
"sum" : [
62.0
]
}
]
thnx for helping.