private Map<String, String> readKeyValues() throws ElasticException, NoDatabaseException {
		StringBuilder buffer = new StringBuilder();
		buffer.append("{ \"size\": 500, \"query\": { \"match_all\": {} } }");
		JsonObject resp;
		try {
			resp = connection.executeStatement(ElasticConnection.GET, "configuration/_search",
				buffer.toString());
		}
		catch (ElasticException ex) {
			if (ex.getMessage().contains("index_not_found_exception")) {
				throw new NoDatabaseException("Database instance does not exist");
			}
			throw ex;
		}
		JsonObject baseHits = (JsonObject) resp.get("hits");
		long total = 0;
		if (baseHits != null) {
			JsonObject totalRec = (JsonObject) baseHits.get("total");
			total = totalRec.get("value").getAsLong();
		}
		if (total <= 1) {
			throw new ElasticException("Unrecoverable error: Could not find configuration");
		}
		HashMap<String, String> res = new HashMap<>();
		JsonArray hits = (JsonArray) baseHits.get("hits");
		for (JsonElement hit2 : hits) {
			JsonObject hit = (JsonObject) hit2;
			String key = hit.get("_id").getAsString();
			JsonObject source = (JsonObject) hit.get("_source");
			JsonElement value = source.get("value");
			if (ElasticConnection.isNull(value)) {
				continue;		// This might be the "sequence" document
			}
			res.put(key, value.getAsString());
		}
		return res;
	}
Read database configuration ("keyvalue" documents) into a key/value pair map.
@return the populated map
@throws ElasticException for communication problems with the server
@throws NoDatabaseException if the database (as opposed to the server) does not exist
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java