private String createExeFilter(String filterMd5, String filterExeName, String filterArch,
			String filterCompilerName, boolean includeFakes) {
		if (filterMd5 == null && filterExeName == null && filterArch == null &&
			filterCompilerName == null && includeFakes) {
			return null;
		}
		boolean placedFirst = false;
		StringBuilder buffer = new StringBuilder();
		buffer.append("\"filter\": [\n");
		if (filterMd5 != null) {
			if (filterMd5.length() == 32) {	// A complete md5
				buffer.append("{ \"term\" : { \"md5\" : \"");
				buffer.append(filterMd5);
				buffer.append("\" }}");
			}
			else {									// A partial md5 prefix
				buffer.append("{ \"prefix\" : { \"md5\" : \"");
				buffer.append(filterMd5);
				buffer.append("\" }}");
			}
			placedFirst = true;
		}
		if (filterExeName != null) {
			if (placedFirst) {
				buffer.append(",\n");
			}
			buffer.append("{ \"wildcard\" : {");
			buffer.append(" \"name_exec\" : {");
			buffer.append(" \"value\" : \"*");
			buffer.append(escape(filterExeName));
			buffer.append("*\" }}}");
			placedFirst = true;
		}
		if (filterArch != null || filterCompilerName != null) {
			if (placedFirst) {
				buffer.append(",\n");
			}
			buffer.append("{ \"script\": {");
			buffer.append("  \"script\": {");
			buffer.append("  \"inline\": \"");
			if (filterArch == null) {		// cname only
				buffer.append("doc['name_compiler'].value == params.comp");
			}
			else if (filterCompilerName == null) {	// arch only
				buffer.append("doc['architecture'].value == params.arch");
			}
			else {	// Both are provided
				buffer.append(
					"doc['name_compiler'].value == params.comp && doc['architecture'].value == params.arch");
			}
			buffer.append("\",");
			buffer.append("          \"params\": {");
			if (filterArch != null) {
				buffer.append(" \"arch\": \"").append(filterArch);
				if (filterCompilerName != null) {
					buffer.append("\", ");
				}
				else {
					buffer.append("\" ");
				}
			}
			if (filterCompilerName != null) {
				buffer.append(" \"comp\": \"").append(filterCompilerName).append("\" ");
			}
			buffer.append("}}}}");

		}
		buffer.append("]\n");
		if (!includeFakes) {
			buffer.append(", \"must_not\" : ");
			buffer.append("{ \"prefix\" : { \"md5\" : \"bbbbbbbbaaaaaaaa\" }}\n");
		}
		return buffer.toString();
	}
Entry point for the Elasticsearch version of QueryName command:
  Query for a specific executable and functions it contains
@param query is command parameters
@throws ElasticException for communication problems with the server
@throws LSHException for problems adding records to the response
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java