Ok, I will post some of my thoughts here on this, starting with the config file. I think a config file would need to following changes in order to trigger results as an aggregation. basically the aggregation feature would return a hash polygon leveraging the geojson that is returned from ES.
Getting the spatial results back should be very straight forward. The hard part will be in ensure that all the attribute fields still come back across because of the need for filtering and time series interactions.
{
"appInfo": {
"protocol": "http",
"listenPort": 80
},
"esConnections": {
"firstESCluster": {
"id": "clusterID",
"protocol": "http://",
"port": 9200,
"hosts": [
"escluster.mynetwork.com"
],
"indices": [
{
"index": "indexOrAliasName",
"maxResults": 6000,
"geometryField": "geometry",
"geometryType": "geo_point/Point/Polyline/Polygon",
"returnFields": [
"fieldFromIndex", "SeenInFeatureService", "SomeDateField"
],
"dateFields": [
"pickup_date", "SomeDateField"
],
**"aggregation": {
"type": "count", (sum/average/max/min/count)
"output": "geo_point", (hash centroid geo_point, hash polygon, turf hexagon)
"field": "GEOMETRY", (GEOMETRY for count, field for all other types)
"resolution": 9 //this might not be needed because it can be calulated on the fly
},**
"timeInfo": {
"startTimeField": "start_date",
"endTimeField": "end_date",
"timeExtent": [1438401615000, 1439833466000],
"timeInterval": 1,
"timeIntervalUnits": "esriTimeUnitsDays"
}
}
]
}
}
}