You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "A. Steven Anderson" <st...@asanderson.com> on 2009/12/29 20:33:59 UTC

DIH optional fields?

Greetings!

I'm trying to index a MySQL database that has some invalid dates (e.g.
"0000-00-00") which is causing my DIH to abort.

Ideally, I'd like DIH to skip this optional field but not the whole record.

I don't see any way to do this currently, but is there any work-around?

Should there be a JIRA for a field-level optional or onError parameter?

-- 
A. Steven Anderson
Independent Consultant
steve@asanderson.com

Re: DIH optional fields?

Posted by "A. Steven Anderson" <st...@asanderson.com>.
> Use &zeroDateTimeBehavior=convertToNull parameter in you sql connection
> string.
>

That worked great!

Thanks!

-- 
A. Steven Anderson
Independent Consultant
A. S. Anderson & Associates LLC
P.O. Box 672
Forest Hill, MD  21050-0672
443-790-4269
steve@asanderson.com

Re: DIH optional fields?

Posted by AHMET ARSLAN <io...@yahoo.com>.
> I'm trying to index a MySQL database that has some invalid
> dates (e.g.
> "0000-00-00") which is causing my DIH to abort.
> 
> Ideally, I'd like DIH to skip this optional field but not
> the whole record.
> 
> I don't see any way to do this currently, but is there any
> work-around?

Use &zeroDateTimeBehavior=convertToNull parameter in you sql connection string.