lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: date range query performance
Date Sat, 01 Nov 2008 05:10:50 GMT

On Nov 1, 2008, at 1:07 AM, Michael Lackhoff wrote:

> On 31.10.2008 19:16 Chris Hostetter wrote:
>> forteh record, you don't need to index as a "StrField" to get this
>> benefit, you can still index using DateField you just need to round  
>> your
>> dates to some less graunlar level .. if you always want to round  
>> down, you
>> don't even need to do the rounding yourself, just add "/SECOND"
>> or "/MINUTE" or "/HOUR" to each of your dates before sending them  
>> to solr.
>> (SOLR-741 proposes adding a config option to DateField to let this  
>> be done
>> server side)
> Is this also possible for the timestamp that is automatically added to
> all new/updated docs? I would like to be able to search (quickly) for
> everything that was added within the last week or month or whatever.  
> And
> because I update the index only once a day a granuality of /DAY (if  
> that
> exists) would be fine.

Yeah, this should work fine:

    <field name="timestamp" type="date" indexed="true" stored="true"  
default="NOW/DAY" multiValued="false"/>


View raw message