Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The facet functions and analytics working great, especially with json API !
As a developer, I would like a facet function to get a field value from one record from a group, please see this facet query:
{
"schema": {
"slide_id":
,
"slide_name":
,
"slide_create_time":
},
"facet.query": {
"slide_viewed": {
"type": "terms",
"field": "slide_id",
"facet": {
"avg_viewed_time": "avg(slide_viewed_time)",
"created_time": "max(slide_create_time)",
"slide_name": "ANY_FIRST_LAST_OR_FILTER(slide_name)"
}
},
"total": {
"type": "query",
"q": ":",
"facet":
}
}
}
when grouping by slide_id, I would love to have the a function that can pick a slide name from each group of slides with the same slide_id.
I know I can get the name by using sub facet, but it will be in one level deep, and I can't sort by it, it would be great to be in one flat level, so they can be sorted.
thanks!