How to write an interval that groups by every half a month? Rather than
1M I want something like
1/2M to group by from the first to the 16th and from the 16th to the end of the month, every month. Is there a way to do so?
I don't want to end up doing an interval on each day and then calculate manually my results as it's not clean and it would be resource hungry, is there a simple way to do so using setInterval? (in Elasticsearch or Elastica I don't care, I just want the algorithm behind it, thanks!)
$date_grp_agg = new \Elastica\Aggregation\DateHistogram('date'); $date_grp_agg->setField('date')->setFormat("MM-yy")->setInterval('1M'); // This one