title: DataImportHandler can't add/update
body: <p>I am trying to convince solr to perform a bulk import of a sqlite database. 
  I follow the all instruction from Solr-Wiki. 
  I configured DataImportHandler to open that database through jdbc successfully and I can start the import  <a href="http://localhost:8080/solr/dataimport?command=full-import" rel="nofollow">http://localhost:8080/solr/dataimport?command=full-import</a> 
  but whatever I do, DIH didn't add any document even though it seems index the DB</p>
  
  <p>the result</p>
  
  <pre><code>    &lt;str name="command"&gt;full-import&lt;/str&gt;
  
  &lt;str name="Total Requests made to DataSource"&gt;1&lt;/str&gt;
  &lt;str name="Total Rows Fetched"&gt;**14**&lt;/str&gt;
  &lt;str name="Total Documents Skipped"&gt;0&lt;/str&gt;
  &lt;str name="Full Dump Started"&gt;2012-04-06 01:14:30&lt;/str&gt;
  &lt;str name=""&gt;**Indexing completed**. **Added/Updated: 0 documents**. Deleted 0 documents.&lt;/str&gt;
  &lt;str name="Committed"&gt;2012-04-06 01:14:32&lt;/str&gt;
  &lt;str name="Optimized"&gt;2012-04-06 01:14:32&lt;/str&gt;
  &lt;str name="Total Documents Processed"&gt;0&lt;/str&gt;
  </code></pre>
  
  <p>I use the emp table in Oracle DB</p>
  
  <p>data-config.xml</p>
  
  <pre><code>    &lt;dataConfig&gt;
  &lt;dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@//localhost:1521/ORCL" user="scott" password="tiger"/&gt;
  &lt;document&gt;
  &lt;entity name="emp" query="select EMPNO, ENAME from EMP"&gt;
              &lt;field column="EMPNO" name="empno" /&gt;
              &lt;field column="ENAME" name="ename" /&gt;
  &lt;/entity&gt;
  &lt;/document&gt;
  &lt;/dataConfig&gt;
  </code></pre>
  
  <p>schema.xml</p>
  
  <pre><code>&lt;field name="empno" type="int" indexed="true" stored="true"/&gt;
  &lt;field name="ename" type="string" indexed="true" stored="true"/&gt;
  </code></pre>
  
  <p>It doesn't seem to index, but not to stored indexed data</p>
  
  <p>Any ideas why this problem happen?</p>
  
  <p><strong>EDIT 1</strong>
  Log show warning message like..</p>
  
  <pre><code>    WARNING: Error creating document : SolrInputDocument[{ename=ename(1.0)={SMITH}, empno=empno(1.0)={7369}}]
  org.apache.solr.common.SolrException: [doc=null] missing required field: id
      at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:346)
      at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
      at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115)
      at org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:73)
      at org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:293)
      at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:636)
      at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:268)
      at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:187)
      at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
      at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
      at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)
  </code></pre>
  
  <p>that kind of log followed and</p>
  
  <p>this warning message show up end of the log</p>
  
  <pre><code>    2012. 4. 6 오후 12:12:25 org.apache.solr.update.processor.LogUpdateProcessor finish
  INFO: {deleteByQuery=*:*,add=[(null), (null), (null), (null), (null), (null), (null), (null), ... (14 adds)],optimize=} 0 0
  </code></pre>
  
  <p>I thought <strong>missing required field: id</strong> has some relation with the configuration in 
  the schema.xml</p>
  
  <pre><code>&lt;uniqueKey&gt;id&lt;/uniqueKey&gt; 
  </code></pre>
  
  <p>but after delete, I got this message</p>
  
  <p>HTTP Status 500 - Severe errors in solr configuration. Check your log files for more detailed information on what may be wrong. If you want solr to continue after configuration errors, change: false in solr.xml ------------------------------------------------------------- org.apache.solr.common.SolrException: QueryElevationComponent requires the schema to have a uniqueKeyField implemented using StrField at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:158) at org.apache.solr.core.SolrResourceLoader.inform</p>
  
  <p>Any advice?</p>