If indeed you do wish to round dates at index time, there is an update request processor for that that is in my book (look up "round date" in the index.) it lets you specify a unit of rounding, such as minute, hour, day, month, year, etc.

It is actually a JavaScript script that uses the Solr stateless script update processor.

-- Jack Krupansky

-----Original Message----- From: Alexandre Rafalovitch
Sent: Sunday, April 6, 2014 8:29 AM
To: solr-user@lucene.apache.org
Subject: Re: Rounding date indexing to minute

Have you tried date math formulas? Don't need to round up what's stored,
just how you query and cache.

Regards,
     Alex
On 06/04/2014 2:45 pm, "Darniz" <rnizamud...@edmunds.com> wrote:

Hello

can someone please tell me how to make sure in solr to store date only till minute level, since i am having issues with date range query performance. i
read in forums to reduce date precision so that the queries become faster.

As of now its storing date till seconds.
<date name="liveDate">2014-03-11T07:00:00Z</date>

i am only concerned till minute granularity. Also the i am using
solr.trieDateField
        <fieldType name="liveDateType" class="solr.TrieDateField"
precisionStep="8" sortMissingLast="true" omitNorms="true"/>
               <field name="liveDate" type="liveDateType" indexed="true"
stored="true" />

is there a provision for this
Please let me know

thanks
darniz






--
View this message in context:
http://lucene.472066.n3.nabble.com/Rounding-date-indexing-to-minute-tp4129482.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to