in flume-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/AbstractElasticSearchIndexRequestBuilderFactory.java [75:87]
public IndexRequestBuilder createIndexRequest(Client client,
String indexPrefix, String indexType, Event event) throws IOException {
IndexRequestBuilder request = prepareIndex(client);
String realIndexPrefix = BucketPath.escapeString(indexPrefix, event.getHeaders());
String realIndexType = BucketPath.escapeString(indexType, event.getHeaders());
TimestampedEvent timestampedEvent = new TimestampedEvent(event);
long timestamp = timestampedEvent.getTimestamp();
String indexName = getIndexName(realIndexPrefix, timestamp);
prepareIndexRequest(request, indexName, realIndexType, timestampedEvent);
return request;
}