code: public String addDocuments(String indexName, String indexType,String addTemplate, List<?> beans,String refreshOption) throws ElasticSearchException{
  		StringBuilder builder = new StringBuilder();
  		for(Object bean:beans) {
  			ESTemplateHelper.evalBuilkTemplate(esUtil,builder,indexName,indexType,addTemplate,bean,"index",this.client.isUpper7());
  		}
  		if(refreshOption == null)
  			return this.client.executeHttp("_bulk",builder.toString(),ClientUtil.HTTP_POST);
  		else
  			return this.client.executeHttp("_bulk?"+refreshOption,builder.toString(),ClientUtil.HTTP_POST);
  	}
docs: 批量创建索引
  @param indexName
  @param indexType
  @param addTemplate
  @param beans
  @param refreshOption
  refresh=wait_for
  refresh=false
  refresh=true
  refresh
  Empty string or true
  Refresh the relevant primary and replica shards (not the whole index) immediately after the operation occurs, so that the updated document appears in search results immediately. This should ONLY be done after careful thought and verification that it does not lead to poor performance, both from an indexing and a search standpoint.
  wait_for
  Wait for the changes made by the request to be made visible by a refresh before replying. This doesn’t force an immediate refresh, rather, it waits for a refresh to happen. Elasticsearch automatically refreshes shards that have changed every index.refresh_interval which defaults to one second. That setting is dynamic. Calling the Refresh API or setting refresh to true on any of the APIs that support it will also cause a refresh, in turn causing already running requests with refresh=wait_for to return.
  false (the default)
  Take no refresh related actions. The changes made by this request will be made visible at some point after the request returns.
  @return
  @throws ElasticSearchException