title: Solr Exception: Document is missing mandatory uniqueKey field: id
body: <p>I get the above error while trying to insert a row...My schema is given below and im using the same id field</p>
  
  <pre><code>Python code:
  
  import solr
  
  # create a connection to a solr server
  s = solr.SolrConnection('http://127.0.0.1:8983/solr')
  
  # add a document to the index
  doc = dict(
      id="1",
      name='Lucene in Action',
      author_name='ErikHatcher',
      )
  print doc
  s.add(doc,commit=True)
  
  # do a search
  response = s.query('title:lucene')
  for hit in response.results:
      print hit['title']
  
  
  Error:
  
  ERROR - 2014-07-29 00:29:09.752; org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field: id
          at org.apache.solr.update.AddUpdateCommand.getIndexedId(AddUpdateCommand.java:92)
          at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:717)
          at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:557)
          at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
          at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:247)
  </code></pre>
  
  <p>
       </p>
  
  <pre><code>   &lt;!-- Table Field --&gt;
     &lt;field name="name" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="slug" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="author_name" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="sku" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="price" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="Old_price" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="is_active" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="is_bestseller" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="is_featured" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="description" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="meta_keywords" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="meta_description" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="created_at" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="updated_at" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="image" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="thumbnail" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="image_caption" type="string" indexed="true" stored="true" multiValued="false"/&gt;
     &lt;field name="category" type="string" indexed="true" stored="true" multiValued="false"/&gt;
  
   &lt;field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/&gt;
  
  
     &lt;!-- catchall field, containing all other searchable text fields (implemented
          via copyField further on in this schema  --&gt;
     &lt;field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/&gt;
  
     &lt;!-- catchall text field that indexes tokens both normally and in reverse for efficient
          leading wildcard queries. --&gt;
     &lt;field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/&gt;
  
     &lt;!-- non-tokenized version of manufacturer to make it easier to sort or group
          results by manufacturer.  copied from "manu" via copyField --&gt;
     &lt;field name="manu_exact" type="string" indexed="true" stored="false"/&gt;
  
     &lt;field name="payloads" type="payloads" indexed="true" stored="true"/&gt;
  
  &lt;field name="_version_" type="long" indexed="true" stored="true"/&gt;
  &lt;dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_is" type="int"    indexed="true"  stored="true"  multiValued="true"/&gt;
     &lt;dynamicField name="*_s"  type="string"  indexed="true"  stored="true" /&gt;
     &lt;dynamicField name="*_ss" type="string"  indexed="true"  stored="true" multiValued="true"/&gt;
     &lt;dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_ls" type="long"   indexed="true"  stored="true"  multiValued="true"/&gt;
     &lt;dynamicField name="*_t"  type="text_general"    indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_txt" type="text_general"   indexed="true"  stored="true" multiValued="true"/&gt;
     &lt;dynamicField name="*_en"  type="text_en"    indexed="true"  stored="true" multiValued="true"/&gt;
     &lt;dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/&gt;
     &lt;dynamicField name="*_bs" type="boolean" indexed="true" stored="true"  multiValued="true"/&gt;
     &lt;dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_fs" type="float"  indexed="true"  stored="true"  multiValued="true"/&gt;
     &lt;dynamicField name="*_d"  type="double" indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_ds" type="double" indexed="true"  stored="true"  multiValued="true"/&gt;
  
     &lt;!-- Type used to index the lat and lon components for the "location" FieldType --&gt;
     &lt;dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false" /&gt;
  
     &lt;dynamicField name="*_dt"  type="date"    indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_dts" type="date"    indexed="true"  stored="true" multiValued="true"/&gt;
     &lt;dynamicField name="*_p"  type="location" indexed="true" stored="true"/&gt;
  
     &lt;!-- some trie-coded dynamic fields for faster range queries --&gt;
     &lt;dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/&gt;
  
     &lt;dynamicField name="*_pi"  type="pint"    indexed="true"  stored="true"/&gt;
     &lt;dynamicField name="*_c"   type="currency" indexed="true"  stored="true"/&gt;
  
     &lt;dynamicField name="ignored_*" type="ignored" multiValued="true"/&gt;
  </code></pre>
  
  <p>
     </p>
  
  <p></p>
  
  <p>
   id</p>