Re: Rounding date fields

2008-08-29 Thread Chris Hostetter
: > it also starts to get ito the realm of "arbitrary processing of values : > prior to storing/indexing ... which could be useful in other ways (ie: : > parsing alternate date formats) and for other field types (ie: limit : > numeric fiels to a certain range, round float input to an int, etc...)

Re: Rounding date fields

2008-08-28 Thread Shalin Shekhar Mangar
On Fri, Aug 29, 2008 at 12:34 AM, Chris Hostetter <[EMAIL PROTECTED]>wrote: > it also starts to get ito the realm of "arbitrary processing of values > prior to storing/indexing ... which could be useful in other ways (ie: > parsing alternate date formats) and for other field types (ie: limit > num

Re: Rounding date fields

2008-08-28 Thread Otis Gospodnetic
- Lucene - Solr - Nutch - Original Message > From: Chris Hostetter <[EMAIL PROTECTED]> > To: solr-user@lucene.apache.org > Sent: Thursday, August 28, 2008 3:04:14 PM > Subject: Re: Rounding date fields > > > : I propose the following syntax similar to the DateM

Re: Rounding date fields

2008-08-28 Thread Chris Hostetter
: I propose the following syntax similar to the DateMath syntax: ... : Any date will be rounded to the nearest specified time and less significant : units will be set to their least possible value. : If it is not desirable to round to nearest element (many times users don't : want a value

Re: Rounding date fields

2008-08-28 Thread Shalin Shekhar Mangar
On Thu, Aug 28, 2008 at 10:13 PM, Otis Gospodnetic < [EMAIL PROTECTED]> wrote: > Yeah, I was thinking of something similar, too. Would the following be > even simpler? > > > omitNorms="true" round="UP_MINUTE" /> > or > omitNorms="true" round="DOWN_MINUTE" /> > > - Single new attrib name. > - Sh

Re: Rounding date fields

2008-08-28 Thread Otis Gospodnetic
xt -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: Shalin Shekhar Mangar <[EMAIL PROTECTED]> > To: solr-user@lucene.apache.org > Sent: Thursday, August 28, 2008 12:18:09 PM > Subject: Re: Rounding date fields > > Hi Otis, > > This

Re: Rounding date fields

2008-08-28 Thread Shalin Shekhar Mangar
Hi Otis, This seems like a common use-case since it is suggested often. We should add this capability to the solr.DateField. I propose the following syntax similar to the DateMath syntax: Any date will be rounded to the nearest specified time and less significant units will be set to their le

Re: Rounding date fields

2008-08-28 Thread Stephen Weiss
I was just dealing with this issue the other day! My solution was to have PHP re-parse the dates to always be exactly at midnight of their respective day (so that the extra time info wouldn't affect sorting), and then when the dates are displayed my format string only includes date info...