title: Index data with Solr PHP Client
body: <p>I'm using the <code>Solr PHP Client</code> and have the <code>Solr 4.3.0</code> example up and running. I have not modified the <code>schema.xml</code> file. When I run this code I get a <code>400</code> error: </p>
  
  <pre><code>Uncaught exception 'Apache_Solr_HttpTransportException' with message '400' Status: Bad Request.'
  </code></pre>
  
  <p>The document does not show up in the index. Interestingly, If I restart <code>Jetty</code>, the document is indexed. Here's my code. I was wondering if I'm missing something. I thought this was an issue with my input matching the schema, but <code>id</code> seems to be the only required field and these other fields are in the schema. I'm not sure what to do.</p>
  
  <pre><code>require_once('SolrPhpClient/Apache/Solr/Service.php');
  
  $solr = new Apache_Solr_Service('localhost', 8983, '/solr/');
  
  if($solr-&gt;ping() == null){
      die('could not ping solr');
  }
  
  $document = new Apache_Solr_Document();
  $document-&gt;id = 'guid1';
  $document-&gt;title = 'Title1';
  $document-&gt;subject = 'The subject is solr';
  $document-&gt;description = 'This is the description';
  
  $solr-&gt;addDocument($document);
  $solr-&gt;commit();
  </code></pre>
  
  <p>The full error message I get is </p>
  
  <pre><code>Fatal error: Uncaught exception 'Apache_Solr_HttpTransportException' with message ''400' Status: Bad Request' in C:\xampp\htdocs\dev\SolrPhpClient\Apache\Solr\Service.php:364 
  Stack trace: 
  #0 C:\xampp\htdocs\dev\SolrPhpClient\Apache\Solr\Service.php(829): Apache_Solr_Service-&gt;_sendRawPost('http://localhos...', '&lt;commit expunge...', 3600)  
  #1 C:\xampp\htdocs\dev\indexerSOLR_PHP.php(20): Apache_Solr_Service-&gt;commit()  
  #2 {main} thrown in C:\xampp\htdocs\dev\SolrPhpClient\Apache\Solr\Service.php on line 364`
  </code></pre>