Formatting Solr date faceting parameters

82 Views Asked by At

Below is the Solr for finding facets for view time.

http://localhost:8983/solr/corearticle/select?indent=on&q=viewtime:*&facet=true&facet.field=viewtime&facet.date=viewtime&facet.date.start=NOW/DAY-30DAYS&facet.date.end=NOW/DAY+30DAYS&facet.date.gap=+1DAY

And below is the result:

<lst name="facet_counts">
<lst name="facet_queries"/>
<lst name="facet_fields">
<lst name="viewtime">
<int name="2016-09-14T16:13:26Z">1</int>
<int name="2016-10-26T09:16:36Z">1</int>
<int name="2016-10-26T09:32:00Z">1</int>
<int name="2016-10-26T09:32:16Z">1</int>
<int name="2017-09-02T15:23:24Z">1</int>
<int name="2017-09-03T15:23:32Z">1</int>
<int name="2017-09-03T18:42:27Z">1</int>
<int name="2017-09-07T11:29:31Z">1</int>
<int name="2017-09-12T16:49:48Z">1</int>
<int name="2017-09-12T16:50:21Z">1</int>
<int name="2017-09-12T16:50:39Z">1</int>
<int name="2017-09-12T16:50:54Z">1</int>
<int name="2017-09-12T16:51:08Z">1</int>
<int name="2017-09-12T16:51:17Z">1</int>
<int name="2017-09-12T17:10:32Z">1</int>
<int name="2017-09-12T17:16:38Z">1</int>
<int name="2017-09-12T17:29:24Z">1</int>
<int name="2017-09-12T17:30:31Z">1</int>
<int name="2017-09-12T17:30:41Z">1</int>
<int name="2017-09-12T17:30:49Z">1</int>
<int name="2017-09-13T11:33:18Z">1</int>
<int name="2017-09-13T11:33:29Z">1</int>
<int name="2017-09-13T11:42:59Z">1</int>
<int name="2017-09-13T11:43:17Z">1</int>
<int name="2017-09-13T11:43:46Z">1</int>
<int name="2017-09-13T11:55:05Z">1</int>
<int name="2017-09-13T11:55:29Z">1</int>
<int name="2017-09-13T12:15:18Z">1</int>
<int name="2017-09-13T12:20:49Z">1</int>
<int name="2017-09-13T12:21:18Z">1</int>
<int name="2017-09-13T12:26:21Z">1</int>
<int name="2017-09-13T15:57:01Z">1</int>
<int name="2017-09-13T16:01:20Z">1</int>
<int name="2017-09-13T16:01:59Z">1</int>
<int name="2017-09-13T16:02:03Z">1</int>
<int name="2017-09-13T16:02:06Z">1</int>
<int name="2017-09-13T16:31:35Z">1</int>
<int name="2017-09-13T16:41:41Z">1</int>
<int name="2017-09-13T16:43:28Z">1</int>
<int name="2017-09-13T17:10:21Z">1</int>
<int name="2017-09-13T17:10:47Z">1</int>
</lst>
</lst>
<lst name="facet_ranges"/>
<lst name="facet_intervals"/>
<lst name="facet_heatmaps"/>
</lst>

But this returning in default yyyy-MM-ddTHH:mm:ssZ format. I need to be grouped by according to yyyy-MM-dd format.

1

There are 1 best solutions below

0
On

It cannot be changed as the date format used is a restricted form of the canonical representation of dateTime as mentioned here Working with Dates