private boolean checkIndexVersion(String firstIndexLine) throws IndexVersionException {

		boolean consumed =
			firstIndexLine != null && firstIndexLine.startsWith(INDEX_VERSION_PREFIX);

		int indexImplVersion = getIndexImplementationVersion();

		int indexVersion = getIndexVersion(firstIndexLine);

		if (indexVersion >= 0 && indexVersion < indexImplVersion) {
			throw new IndexVersionException("Filesystem Index upgrade/rebuild required", true);
		}
		if (indexVersion != indexImplVersion) {
			throw new IndexVersionException(
				"Unsupported Filesystem Index version (newer version of application required)",
				false);
		}

		return consumed;
	}
Check the firstIndexLine to verify the index version.
@return true if firstIndexLine was consumed
@throws IndexVersionException if index version error occurs
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/IndexedLocalFileSystem.java