public static String escape(String s) {
		final int len = s.length();
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i < len; i++) {
			char ch = s.charAt(i);
			switch (ch) {
				case '"':
					sb.append("\\\"");
					break;
				case '\\':
					sb.append("\\\\");
					break;
				case '\b':
					sb.append("\\b");
					break;
				case '\f':
					sb.append("\\f");
					break;
				case '\n':
					sb.append("\\n");
					break;
				case '\r':
					sb.append("\\r");
					break;
				case '\t':
					sb.append("\\t");
					break;
				case '/':
					sb.append("\\/");
					break;
				default:
					//Reference: http://www.unicode.org/versions/Unicode5.1.0/
					if ((ch >= '\u0000' && ch <= '\u001F') || (ch >= '\u007F' && ch <= '\u009F') ||
						(ch >= '\u2000' && ch <= '\u20FF')) {
						String ss = Integer.toHexString(ch);
						sb.append("\\u");
						for (int k = 0; k < 4 - ss.length(); k++) {
							sb.append('0');
						}
						sb.append(ss.toUpperCase());
					}
					else {
						sb.append(ch);
					}
			}
		}
		return sb.toString();
	}
Implement the BSim database interface on top of an ElasticSearch back-end
ElasticSearch holds records as JSON documents.  Documents
are stored in a specific "index". The primary BSim document index/types are:
  executable/exe      is executable metadata corresponding to the ExecutableRecord object
  executable/function is function metadata corresponding to the FunctionDescription object
  vector/vector       is the main feature vector corresponding to an LSHVector object
  meta/meta           is a document containing the duplication count for a particular feature vector
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java