Facets supported both key_script and value_script in this manner:
{
"size": 0,
"facets": {
"by-hour": {
"histogram": {
"key_script": "doc['media.created_time'].date.hourOfDay",
"value_script": "doc['media.likes.count'].value +
doc['media.comments.count'].value"
}
}
},
"query": {
"bool": {
"must": [
{
"term": {
"stream_id": {
"value": "1b883b7b-364b-4b5d-b099-9e7ef329a445"
}
}
}
]
}
}
}
What's the equivalent of this for aggregations under 1.2.2.?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fb3df9e3-2a96-4b94-8247-1c6f896c455f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.