You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Jana, Kumar Raja" <kj...@ptc.com> on 2008/12/19 14:08:25 UTC

Date Stats support using Solr

Hi,

 

I was searching for features in Solr which would give me the maximum and
minimum values for various numeric and name fields. I found the Stats
Component (Solr-680) and thanks a ton for that !!! J

 

Is there a similar component for date fields too? I played a bit with
the stats component but I could not get it to work with dates. Of
course, converting the date to milliseconds and indexing it as long is
an option but can the StatsComponent be extended or tampered with to
return the max date and min date in the result set?

 

Thanks,

Kumar


Re: Date Stats support using Solr

Posted by Chris Hostetter <ho...@fucit.org>.
(Still catching up on holiday mail) ...

: I was searching for features in Solr which would give me the maximum and
: minimum values for various numeric and name fields. I found the Stats
: Component (Solr-680) and thanks a ton for that !!! J

: Is there a similar component for date fields too? I played a bit with

I don't think so, but for just getting the min/max date value (not sure 
what other stats would make sense for dates) this would probably be a 
fairly easy patch to StatsComponent if someone wanted to take  a stab at 
it.

the only way i know of to accomplish this now is to do two queries: 
asc/desc sort by date and see what comes back.



-Hoss