private void initializeElastic(Configuration config)
			throws ElasticException, NoDatabaseException {
		connection = new ElasticConnection(baseURL, repository);
		if (baseURL.startsWith("https")) {
			connectionType = ConnectionType.SSL_Password_Authentication;
		}
		config.info = new DatabaseInformation();
		readBasicInfo(config);

		vectorFactory = new Base64VectorFactory();
		config.weightfactory = new WeightFactory();
		config.idflookup = new IDFLookup();
		JsonObject res;
		try {
			res = connection.executeURIOnly(ElasticConnection.GET, "vector/_settings");
		}
		catch (ElasticException ex) {
			if (ex.getMessage().contains("no such index")) {
				throw new NoDatabaseException(baseURL);
			}
			throw ex;
		}
		JsonObject repo = (JsonObject) res.get(repository + "_vector");
		JsonObject settings = (JsonObject) repo.get("settings");
		JsonObject index = (JsonObject) settings.get("index");
		JsonObject analysis = (JsonObject) index.get("analysis");
		JsonObject tokenizer = (JsonObject) analysis.get("tokenizer");
		String tokenizerName = null;
		for (String key : tokenizer.keySet()) {
			if (key.startsWith("lsh_")) {
				tokenizerName = key;
				break;
			}
		}
		if (tokenizerName == null) {
			throw new ElasticException("Missing tokenizer configuration");
		}
		JsonObject tokenizerSettings = (JsonObject) tokenizer.get(tokenizerName);
		String idfWeights = tokenizerSettings.get(ElasticUtilities.LSH_WEIGHTS).getAsString();
		String[] split = idfWeights.split(" ");
		double[] weightArray = new double[split.length];
		if (weightArray.length != config.weightfactory.getSize()) {
			throw new ElasticException("weighttable has wrong number of rows");
		}
		for (int i = 0; i < weightArray.length; ++i) {
			weightArray[i] = Double.parseDouble(split[i]);
		}
		config.weightfactory.set(weightArray);

		String lookup = tokenizerSettings.get(ElasticUtilities.IDF_CONFIG).getAsString();
		split = lookup.split(" ");
		int[] lookupArray = new int[split.length];
		for (int i = 0; i < lookupArray.length; ++i) {
			lookupArray[i] = Integer.parseInt(split[i]);
		}
		config.idflookup.set(lookupArray);
	}
Initialize a new BSim repository.  This does most of the work of reading
configuration info and setting up the various factories.
@param config is the Configuration object that is populated during initialization
@throws ElasticException for communication problems with the server
@throws NoDatabaseException if the specific database does not exist on the server
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java