code: private void addToBuffer(String index, String document) {
  		JsonObject message = new JsonObject();
  		message.put("event", "index");
  		message.put("index", index);
  		message.put("document", document);
  		sendToIndex(message.toString());
  	}
docs: Add a new document into the buffer, and check if submission is required
  
  @param document
  : The Solr document to add to the buffer.