Does anyone know if it's possible to do Date Math in a Range Facet
I need a facet that would be a range, like this:
{
"range": {
"dateField1":[
{ "from": "now", "to": "now+1d" }
,{"from": "now-1d", "to": "now" }
,{"from": "now-1w", "to": "now+1d" }
,{"from": "now-1m", "to": "now+1d" }
,{"from": "now-2m", "to": "now+1d" }
]
}
}
The result should be a facet with values like:
Date Field Facet
Today
Yesterday
Within the Last Week
Within the Last Month
Within the Last 2 Months
If it's not possible, does anyone know how you can do this without having
to dynamically change the facet definition every time it runs
Thanks
Wes
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.