private void queryExecutables(DescriptionManager manager, List<ExecutableRecord> exeList,
			int maxWindow, String searchAfter, boolean md5Order, String filter)
			throws ElasticException, LSHException {
		StringBuilder buffer = new StringBuilder();
		buffer.append("{ \"size\": ").append(maxWindow);
		buffer.append(", \"query\": {");
		buffer.append("  \"bool\": {");
		buffer.append("    \"must\": {");
		buffer.append("      \"exists\": { \"field\": \"md5\" } }");
		if (filter != null) {
			buffer.append(", ");
			buffer.append(filter);
		}
		buffer.append("}}, ");
		if (searchAfter != null) {
			buffer.append("\"search_after\": [ \"");
			buffer.append(escape(searchAfter));
			buffer.append("\"], ");
		}
		if (md5Order) {
			buffer.append("\"sort\": [ { \"md5\": \"asc\" } ] }");
		}
		else {
			buffer.append("\"sort\": [ { \"name_exec\": \"asc\" } ] }");
		}
		JsonObject resp = connection.executeStatement(ElasticConnection.GET, "executable/_search",
			buffer.toString());
		JsonObject baseHits = (JsonObject) resp.get("hits");
		JsonArray hitsArray = (JsonArray) baseHits.get("hits");
		for (JsonElement element : hitsArray) {
			JsonObject exerow = (JsonObject) element;
			ExecutableRecord exeRecord = makeExecutableRecord(manager, exerow);
			exeList.add(exeRecord);
		}
	}
Within the list of all executables sorted by md5 or name, query for executables
from a specific window in this list.
@param manager is the container to receive the ExecutableRecords
@param exeList will have recovered ExecutableRecords appended to the end
@param maxWindow is (maximum) number of executables in the window
@param searchAfter is the (md5 or name) of the last executable before the window
    or null if the first window is desired
@param md5Order is true if executables are ordered by md5, false if ordered by name
@param filter is an (optional) filter to apply to the list before constructing the window
@throws ElasticException if there are errors querying the database
@throws LSHException for problems creating the result set
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java