Or group by a function query which is the date field converted to milliseconds divided by the number of milliseconds in a day.

Such as:

 q=*:*&group=true&group.func=rint(div(ms(date_dt),mul(24,mul(60,mul(60,1000)))))

-- Jack Krupansky

-----Original Message----- From: Amit Nithian
Sent: Thursday, November 29, 2012 10:29 PM
To: solr-user@lucene.apache.org
Subject: Re: Grouping by a date field

Why not create a new field that just contains the day component? Then you
can group by this field.


On Thu, Nov 29, 2012 at 12:38 PM, sdanzig <sdan...@gmail.com> wrote:

I'm trying to create a SOLR query that groups/field collapses by date.  I
have a field in YYYY-MM-dd'T'HH:mm:ss'Z' format, "datetime", and I'm
looking
to group by just per day.  When grouping on this field using
group.field=datetime in the query, SOLR responds with a group for every
second.  I'm able to easily use this field to create day-based facets, but
not groups.  Advice please?

- Scott



--
View this message in context:
http://lucene.472066.n3.nabble.com/Grouping-by-a-date-field-tp4023318.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to