I forgot to mention another issue I run into.  Looks like "docValues" is
not supported with DateRangeField, is this true?

If I have:

    <fieldType name="dateRange" class="solr.DateRangeField"/>
    <field name="other_dates" docValues="true" type="dateRange"
multiValued="true" indexed="true" required="false" stored="false"/>

Solr will fail to start, reporting the following error:

    org.apache.solr.core.CoreContainer; Error creating core [openpages]:
Could not load conf for core openpages: Field type
dateRange{class=org.apache.solr.schema.DateRangeField,analyzer=org.apache.solr.schema.FieldType$DefaultAnalyzer,args={class=solr.DateRangeField}}
does not support doc values.

I have to remove "docValues" to fix this.  Is this the case or have I
missed something?

Thanks.

Steve

On Thu, Jun 2, 2016 at 11:46 AM, Steven White <swhite4...@gmail.com> wrote:

> Hi everyone,
>
> This is two part question about date in Solr.
>
> Question #1:
>
> My understanding is, in order for me to index date types, the date data
> must be formatted and indexed as such:
>
>     YYYY-MM-DDThh:mm:ssZ
>
> What if I do not have the time part, should I be indexing it as such and
> still get all the features of facet search on date (obviously, excluding
> time):
>
>     YYYY-MM-DD
>
> I have setup my Solr schema as such to index dates:
>
>     <fieldType name="dateRange" class="solr.DateRangeField"/>
>     <field name="other_dates" docValues="true" type="dateRange"
> multiValued="true" indexed="true" required="false" stored="false"/>
>
> Question #2:
>
> Per the above schema design, I will be indexing my date type as
> "multiValued" which, as you know, more than 1 date data will be indexed
> into the field "other_dates".  Will this be a problem when I facet search
> on this field?  That is, will all the date facet capability still work,
> such as range and math per
> https://cwiki.apache.org/confluence/display/solr/Working+with+Dates
> (obviously, excluding time)?
>
> Thanks in advance.
>
> Steve
>

Reply via email to