--- On Fri, 5/6/11, Rohit <ro...@in-rev.com> wrote:

> From: Rohit <ro...@in-rev.com>
> Subject: RE: Solr: org.apache.solr.common.SolrException: Invalid Date String:
> To: solr-user@lucene.apache.org
> Date: Friday, May 6, 2011, 8:47 AM
> Hi Craig,
> 
> Thanks for the response, actually what we need to achive is
> see group by
> results based on dates like,
> 
> 2011-01-01  23
> 2011-01-02  14
> 2011-01-03  40
> 2011-01-04  10
> 
> Now the records in my table run into millions, grouping the
> result based on
> UTC date would not produce the right result since the
> result should be
> grouped on users timezone.  Is there anyway we can
> achieve this in Solr?

Easiest way can be create additional string typed field, and use copyField to 
populate it. (copy first 10 characters from (t)date into string)

And facet on that string field.  &facet=on&facet.field=SDATE

<field name="DATE" type="tdate" indexed="true" stored="true"/>
<field name="SDATE" type="string" indexed="true" stored="true"/>

<copyField source="DATE" dest="SDATE" maxChars="10"/>

Reply via email to