docs: public void index(DigitalObject object, Payload payload) throws IndexerException {
  		String oid = object.getId();
  		String pid = payload.getId();
  
  		// Don't proccess annotations through this function
  		if (pid.startsWith("anotar.")) {
  			annotate(object, payload);
  			return;
  		}
  		// log.info("Indexing OID:'{}', PID: '{}'", oid, pid);
  
  		// get the indexer properties or we can't index
  		Properties props;
  		try {
  			props = object.getMetadata();
  		} catch (StorageException ex) {
  			throw new IndexerException("Failed loading properties : ", ex);
  		}
  
  		try {
  			// Get the harvest files
  			String confOid = props.getProperty("jsonConfigOid");
  			String rulesOid = props.getProperty("rulesOid");
  			String scriptType = props.getProperty("scriptType");
  			String doc;
  			// Generate the Solr document
  			if ("groovy".equals(scriptType) || StringUtils.isBlank(scriptType)) {
  				doc = indexByGroovyScript(object, payload, confOid, rulesOid, props);
  			} else {
  				doc = indexByPythonScript(object, payload, confOid, rulesOid, props);
  			}
  
  			// Did the indexer alter metadata?
  			String toClose = props.getProperty("objectRequiresClose");
  			if (toClose != null) {
  				log.debug("Indexing has altered metadata, closing object.");
  				props.remove("objectRequiresClose");
  				object.close();
  				try {
  					props = object.getMetadata();
  				} catch (StorageException ex) {
  					throw new IndexerException("Failed loading properties : ", ex);
  				}
  			}
  
  			addToBuffer(oid + "/" + pid, doc);
  		} catch (Exception e) {
  			log.error("Indexing failed!\n-----\n", e);
  		}
  	}