lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject Re: Indexing date data for facet search
Date Tue, 12 Apr 2016 13:57:40 GMT
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 <erickerickson@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 <swhite4141@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message