title: Indexing 10 million documents using Elasticsearch
body: <p>I'm trying to index 10 million documents into my Elasticsearch index using the Elastica API.
  I'm running my script over an Ubuntu server with 16G RAM and 8 cores.</p>
  
  <p>So far, I can't index more than 250000 docs. My script is breaking and returning an unknown error.</p>
  
  <p><strong><em>Can someone describe me the step to insure the indexing of this amount of data?</em></strong></p>
  
  <p>I have found a question similar to mine <a href="https://stackoverflow.com/questions/22762908/indexing-speed-of-elasticsearch-for-10-million-events">here</a>, but the answers don't seem very clear to me.</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>I have ran the index script that <a href="https://stackoverflow.com/users/1218285/nate">Nate</a> suggested from <a href="http://blog.smeef.co.uk/elasticsearch-swap-index-type-application-job/" rel="nofollow noreferrer">here</a> and I got the following output :</p>
  
  <pre><code>close index
  {
   "acknowledged" : true
  }
  refresh rate
  {
   "acknowledged" : true
  }
  merge policy
  {
   "acknowledged" : true
  }
  replicas
  {
   "acknowledged" : true
  }
  flush
  {
   "acknowledged" : true
  }
  buffer
  {
   "acknowledged" : true
  }
  {
   "acknowledged" : true
  }
  </code></pre>
  
  <p><strong><em>PS:</strong> I slightly modified the script for more visibility on the output</em></p>
  
  <p><strong>EDIT 2:</strong>
  I have switched from Elastica to using the <a href="https://github.com/jprante/elasticsearch-river-jdbc" rel="nofollow noreferrer">elasticsearch-jdbc-river</a> and now it indexing around 5 millions but still not the whole database.</p>
  
  <p><a href="https://gist.github.com/eliasah/11288834" rel="nofollow noreferrer">Here</a> is the json file for the river and the script file for put it on Elasticsearch is <a href="https://gist.github.com/eliasah/11288893" rel="nofollow noreferrer">here.</a></p>