private boolean insertExecutableRecord(ExecutableRecord exeRecord, String exeId)
			throws ElasticException {
		StringBuilder builder = new StringBuilder();
		builder.append("{ \"md5\": \"").append(exeRecord.getMd5()).append("\", ");
		builder.append("\"name_exec\": \"").append(escape(exeRecord.getNameExec())).append("\", ");
		builder.append("\"architecture\": \"").append(exeRecord.getArchitecture()).append("\", ");
		builder.append("\"name_compiler\": \"").append(exeRecord.getNameCompiler()).append("\", ");
		builder.append("\"ingest_date\": ").append(exeRecord.getDate().getTime()).append(", ");
		if (exeRecord.getRepository() == null) {
			builder.append("\"repository\": null, ");
		}
		else {
			builder.append("\"repository\": \"")
					.append(escape(exeRecord.getRepository()))
					.append("\", ");
		}
		if (exeRecord.getPath() == null) {
			builder.append("\"path\": null");
		}
		else {
			builder.append("\"path\": \"").append(escape(exeRecord.getPath())).append("\"");
		}
		List<CategoryRecord> catrecs = exeRecord.getAllCategories();
		if (catrecs != null) {
			builder.append(", ");
			appendCategoryTag(catrecs, builder);
		}
		builder.append(", \"join_field\": \"exe\" }");
		StringBuilder pathbuilder = new StringBuilder();
		pathbuilder.append("executable/_doc/");
		pathbuilder.append(exeId);
		pathbuilder.append("?op_type=create");		// Do "create" operation, so we fail if document already exists
		JsonObject resp = connection.executeStatementExpectFailure(ElasticConnection.PUT,
			pathbuilder.toString(), builder.toString());
		JsonObject error = (JsonObject) resp.get("error");
		if (error != null) {
			String type = error.get("type").getAsString();
			if (type.startsWith("version_conflict")) {
				return false;			// Document already inserted
			}
			String reason = ElasticConnection.convertToString(error.get("reason"));
			throw new ElasticException(reason);
		}
		return true;
	}
Write an ExecutableRecord (meta-data about an executable) to the "executable" index.
@param exeRecord is the record to write
@param exeId is the unique id for the elasticsearch document
@return true if the document gets created, return false is the document already exists
@throws ElasticException if there are problems communicating with the server
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java