@Override
	protected void queryNearestVector(QueryNearestVector query) throws SQLException {
		ResponseNearestVector response = query.nearresponse;
		response.totalvec = 0;
		response.totalmatch = 0;
		response.uniquematch = 0;

		// Use really big vector limit if not specified
		int vectormax = query.vectormax == 0 ? 2000000 : query.vectormax;

		List<FunctionDescription> toQuery = getFuncsToQuery(query.manage, query.signifthresh);
		response.totalvec = toQuery.size();

		GThreadPool threadPool = GThreadPool.getSharedThreadPool(H2_THREADPOOL_NAME);
		ConcurrentQBuilder<FunctionDescription, SimilarityVectorResult> evalBuilder =
			new ConcurrentQBuilder<>();
		ConcurrentQ<FunctionDescription, SimilarityVectorResult> evalQ =
			evalBuilder.setThreadPool(threadPool)
					.setCollectResults(true)
					.setMonitor(TaskMonitor.DUMMY)
					.build((fd, m) -> {
						List<VectorResult> resultset = new ArrayList<>();
						queryNearestVector(resultset, fd.getSignatureRecord().getLSHVector(),
							query.thresh, query.signifthresh, vectormax);
						if (resultset.isEmpty()) {
							return null;
						}
						SimilarityVectorResult simres = new SimilarityVectorResult(fd);
						simres.addNotes(resultset);
						return simres;
					});

		evalQ.add(toQuery);
		try {
			Collection<QResult<FunctionDescription, SimilarityVectorResult>> results =
				evalQ.waitForResults();
			for (QResult<FunctionDescription, SimilarityVectorResult> result : results) {
				SimilarityVectorResult simres = result.getResult();
				if (simres == null) {
					continue;
				}
				response.totalmatch += simres.getTotalCount();
				if (simres.getTotalCount() == 1) {
					response.uniquematch += 1;
				}
				response.result.add(simres);
			}
		}
		catch (Exception e) {
			return; //shouldn't happen
		}
	}
Create vector map which maps vector ID to {@link VectorStoreEntry}
@return vector map
@throws SQLException if error occurs while reading map data
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/file/H2FileFunctionDatabase.java