code: @Override
    public boolean write(SimpleDataEvent event) {
      LOG.info("Sending ES index event");
      HttpPost postMethod = new HttpPost(esBaseUrl + "/" + indexName + "/" + typeName + "/" + event.getId());
      StringEntity postEntity;
      try {
        postEntity = new StringEntity(JSONUtils.getElasticSearchAddDocument(event.pairs()), "UTF-8");
        postMethod.setEntity(postEntity);
        postMethod.expectContinue();
        return execute(postMethod);
      } catch (UnsupportedEncodingException uee) {
        LOG.error("Error sending event: " + uee);
        return false;
      }
    }
docs: (non-Javadoc)
  
  @see com.sematext.ag.sink.Sink#write(com.sematext.ag.Event)