i am using elastic search to perform aggregation for hourly data and which is aggregated on basis of weekday name: sample data:
{ val:40, hour:00, day:Monday }
{ val:10, hour:01, day:Tuesday }
{ val:30, hour:02, day:Wednesday}
{ val:40, hour:03, day:Thursday }
{ val:60, hour:04, day:Friday }
{ val:70, hour:05, day:Saturday }
what mapping should i use so i can aggregate over hour
field and then over day
field. and what query should i use . is there anything inbuilt like date_histogram
. i can normally aggregate over hour and day field but then the results are not sorted by hour and weekday and sorting it using elastic or in program would be costly. so i was thinking maybe something like date_histogram
where by default dates are sorted