lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <g...@mimirtech.com>
Subject Re: Solr Indexing - Null Values in date field
Date Wed, 21 Sep 2011 11:06:28 GMT
On Wed, Sep 21, 2011 at 4:08 PM, mechravi25 <mechravi25@yahoo.co.in> wrote:
> Hi,
>
> I have a field in my source with data type as string and that field has NULL
> values. I am trying to index this field in solr as a date data type with
> multivalued = true. Following is the entry for that field in my schema.xml
[...]

One cannot have NULL values as input for Solr date fields. The
multivalued part is irrelevant here.

As it seems like you are getting the input data from a database,
you will need to supply some invalid date for NULL date values.
E.g., with mysql, we have:
COALESCE( CreationDate, STR_TO_DATE( '1970,1,1', '%Y,%m,%d' ) )
The required syntax will be different for other databases.

Regards,
Gora

Mime
View raw message