title: elasticsearch java bulk batch size
body: <p>I want to use the elasticsearch bulk api using java and wondering how I can set the batch size.</p>
  
  <p>Currently I am using it as:</p>
  
  <pre><code>BulkRequestBuilder bulkRequest = getClient().prepareBulk();
  while(hasMore) {
      bulkRequest.add(getClient().prepareIndex(indexName, indexType, artist.getDocId()).setSource(json));
      hasMore = checkHasMore();
  }
  BulkResponse bResp = bulkRequest.execute().actionGet();
  //To check failures
  log.info("Has failures? {}", bResp.hasFailures());
  </code></pre>
  
  <p>Any idea how I can set the bulk/batch size?</p>