private long allocateFunctionIndexSpace(int amount) throws ElasticException {
		String body =
			"{ \"script\": { \"inline\": \"ctx._source.iid += params.bulk_size\", \"params\": { \"bulk_size\": " +
				Integer.toString(amount) + "}}}";
		JsonObject resp = connection.executeStatement(ElasticConnection.POST,
			"configuration/_update/1?_source=iid&retry_on_conflict=5", body);
		JsonObject get = (JsonObject) resp.get("get");
		JsonObject fields = (JsonObject) get.get("_source");
		long res = fields.get("iid").getAsLong();
		return res - amount;
	}
Allocate a specific number of ids for function documents.  The document id for a function
is an integer unique across the entire database. Allocation of this id is implemented as an integer
counter stored in a single document. Updating this document for an allocation must take into account
distributed nodes simultaneously requesting ids.
@param amount is the number of ids to allocate
@return the first integer in the newly allocated set of ids
@throws ElasticException for communication problems with the server
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java