private int queryAllFunc(List<FunctionDescription> listFunctions, ExecutableRecord exeRecord,
			String exeId, DescriptionManager manager, int maxDocuments) throws ElasticException {
		long total;
		long start = 0;
		long count = 0;
		do {
			int limit = MAX_FUNCTION_WINDOW;
			if (maxDocuments != 0 && maxDocuments - count < limit) {
				limit = (int) (maxDocuments - count);
			}
			JsonObject resp = queryFunctionsOfExeId(exeId, limit, start);
			JsonObject hits = (JsonObject) resp.get("hits");
			JsonObject totalRec = (JsonObject) hits.get("total");
			total = totalRec.get("value").getAsLong();
			if (maxDocuments != 0 && maxDocuments < total) {
				total = maxDocuments;
			}
			JsonArray hitsarray = (JsonArray) hits.get("hits");
			JsonObject doc = null;
			for (JsonElement element : hitsarray) {
				doc = (JsonObject) element;
				FunctionDescription funcDesc = convertDescriptionRow(doc, exeRecord, manager, null);
				listFunctions.add(funcDesc);
				++count;
			}
			if (hitsarray.size() == 0) {
				break;			// Shouldn't need this, but just in case
			}
			JsonArray sort = (JsonArray) doc.get("sort");
			start = sort.get(0).getAsLong();	// Sort value for last entry, for passing as search_after parameter			
		}
		while (total > count);
		return (int) total;
	}
Query for all functions (up to a maximum) of the given executable.
Populate a list with the resulting FunctionDescription objects
Does NOT populate SignatureRecord or CallGraph parts of the FunctionDescription
@param listFunctions has all queried functions added to it
@param exeRecord is the executable containing the functions
@param exeId is a precomputed document id of the executable
@param manager is the container for the new records
@param maxDocuments is the maximum number of records to read
@return the number of function records read
@throws ElasticException for communication problems with the server
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java