lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mechravi25 <mechrav...@yahoo.co.in>
Subject Solr Indexing - Null Values in date field
Date Wed, 21 Sep 2011 10:38:24 GMT
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

<field name="startdate" type="date" indexed="true" stored="true"
multiValued="true" required="false" />

When I try to index, I get the following exception

org.apache.solr.common.SolrException: Invalid Date String:''
	at org.apache.solr.schema.DateField.parseMath(DateField.java:163)
	at org.apache.solr.schema.TrieDateField.createField(TrieDateField.java:171)
	at org.apache.solr.schema.SchemaField.createField(SchemaField.java:95)
	at
org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:204)
	at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:277)
	at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
	at org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:75)
	at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:292)
	at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:618)
	at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:261)
	at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:185)
	at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:333)
	at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:391)
	at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:372)


I even tried giving the IFNULL condition in my query for that field(Eg:
IFNULL(startdate,'') and also IFNULL(startdate,NULL)) but still I am getting
the same exception.

Is there any way to index the null values as such in date field? 

Please help.



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Indexing-Null-Values-in-date-field-tp3355068p3355068.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message