Hello all,

I've been having this issue for a while now. I am indexing a Sybase
database. Everything is fantastic, except that there is 1 column that I can
never get back. I don't have direct database access via Sybase client, but I
was able to extract the data using some Java code.

The field is essentially a Last Modified field. In the DB I believe that it
is of type long. In the Java program that I have, I am able to retrieve the
data that is in that column and put it in a variable of type Long. This is
not the case in Solr, however.

I set the variable in the schema as required to see why the data is never
stored:
<field name="lastModified" type="long" indexed="true" stored="true"
required="true"/>

This is what I get in the Tomcat logs:

org.apache.solr.common.SolrException: Document [00069391] missing required
field: lastModified
        at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
        at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
        at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
        at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:276)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:373)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:224)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:316)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:374)
        at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:355)

>From what I can gather, it is not finding the data and/or column, and thus
cannot populate the required field. However, the data is there, which I was
able to prove outside of Solr.

Is there a way to generate more descriptive logs for this? I am completely
lost. I hit this problem a few months ago but I was never able to resolve
it. Any help on this will be much appreciated.

BTW, Solr was successful in retrieving data from other columns in the same
table...

Thanks
-- 
View this message in context: 
http://www.nabble.com/Problem-with-retrieving-field-from-database-using-DIH-tp24746530p24746530.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to