It may not have made it into the schemas, so just try adding this to
your schema file:

<fieldType name="dateRange" class="solr.DateRangeField" />

As far as adding the 00Z, I would to be safe.

Best,
Erick

On Tue, Apr 12, 2016 at 6:57 AM, Steven White <swhite4...@gmail.com> wrote:
> Hi Erick,
>
> In Solr's schema.xml, I cannot find <fieldType> for "dateRange", not even
> on Apache Solr Reference guide [1].  What am I missing?  I'm on Solr 5.2.1.
>
> Also, since my date data doesn't have seconds, can I leave ".ssZ" out or
> must I supply it with "00"?
>
> Thanks
>
> Steve
>
> [1] https://cwiki.apache.org/confluence/display/solr/Working+with+Dates
>
> On Mon, Apr 11, 2016 at 9:19 PM, Erick Erickson <erickerick...@gmail.com>
> wrote:
>
>> You have two options for dates in this scenario, "tdate" or "dateRange".
>> Probably in this case use dateRange, it should be more time and
>> space efficient. Here's some background:
>>
>> https://lucidworks.com/blog/2016/02/13/solrs-daterangefield-perform/
>>
>> Date types should be indexed as fully specified strings, as
>>
>> YYYY-MM-DDThh:mm:ssZ
>>
>> Best,
>> Erick
>>
>> On Mon, Apr 11, 2016 at 3:03 PM, Steven White <swhite4...@gmail.com>
>> wrote:
>> > Hi everyone,
>> >
>> > I need to index data data into Solr and then use this field for facet
>> > search.  My question is this, the date data in my DB is stored in the
>> > following format "2016-03-29 15:54:35.461":
>> >
>> > 1) What format I should be indexing this date + time stamp into Solr?
>> > 2) What Solr field type I should be using?  Is it "date"?
>> > 3) How do I handle various time zones and locales?
>> > 4) Can I insert multi value data data into the single "date" facet field
>> > and still use this field for facet search?
>> > 5) Based on my need, will all the Date Math per [1] on date facet still
>> > work? I'm confused here because of my need for (3).
>> >
>> > To elaborate on (4) some more.  The need here is this.  In my DB, there
>> are
>> > more than one column with date data.  I will be indexing them all into
>> this
>> > single multi-value Solr field of type Date that I will then use for
>> facet.
>> > Is this possible?
>> >
>> > I guess, this is a two part question, for date facet: a) how to properly
>> > index, and b) how do I properly search.
>> >
>> > As always, any insight is greatly appreciated.
>> >
>> > Steve
>> >
>> > [1] https://cwiki.apache.org/confluence/display/solr/Working+with+Dates
>>

Reply via email to