code: @Override
  	public void index(Record record) {
  		if (this.client == null) {
  			this.init();
  		}
  
  		String id = null;
  		Map<String, Object> json = new HashMap<String, Object>();
  		for (String propname : record.getProperties()) {
  			Property prop = config.getPropertyByName(propname);
  
  			if (prop == null) {
  				throw new DukeConfigException("Record has property " + propname
  						+ " for which there is no configuration");
  			}
  
  			if (prop.isIdProperty()) {
  				id = record.getValue(propname);
  			} else {
  
  				Collection<String> values = record.getValues(propname);
  				if (values != null && !values.isEmpty()) {
  					if (values.size() == 1) {
  						json.put(propname, Iterables.get(values, 0));
  					} else {
  						json.put(propname, values);
  					}
  				}
  			}
  
  		}
  
  		this.addToIndex(id, json);
  	}
docs: Add the record to the index.