I want to be able to break down my data by year and then further by month, im pretty sure this is possible but cant see exactly how.
I am using the following at the moment to get a yearly breakdown:
'by_year' => ['date_histogram' => ['field' => 'Date', 'calendar_interval' => 'year', 'format'=>'yyyy']]
results in
0 => array:3 [▼
"key_as_string" => "2015"
"key" => 1420070400000
"doc_count" => 40
]
this works great but I need it broken down further to include months of that year for example
0 => array:3 [▼
"key_as_string" => "2015"
"key" => 1420070400000
"doc_count" => 40,
[
"key_as_string" => "January"
"key" => 1420070400000
"doc_count" => 4,
],
[
"key_as_string" => "February"
"key" => 1420070400000
"doc_count" => 14,
],
[
"key_as_string" => "March"
"key" => 1420070400000
"doc_count" => 20,
],
]
is this possible?