private static synchronized IndexJson getAndCacheIndex(PlanetilerConfig config) {
    if (index == null) {
      try (
        InputStream inputStream = Downloader.openStream("https://download.geofabrik.de/index-v1-nogeom.json",
          config)
      ) {
        index = parseIndexJson(inputStream);
      } catch (IOException e) {
        throw new IllegalStateException(e);
      }
    }
    return index;
  }
Fetches the Geofabrik index and searches for a {@code .osm.pbf} resource to download where ID or name field
contains all the tokens in {@code searchQuery}.
<p>
If an exact match is found, returns that. Otherwise, looks for a resource that contains {@code searchQuery} as a
substring.
<p>
The index is only fetched once and cached after that.

@param searchQuery the tokens to search for
@param config      planetiler config with user-agent and timeout to use when downloading files
@return the URL of a {@code .osm.pbf} file with name or ID matching {@code searchQuery}
@throws IllegalArgumentException if no matches, or more than one match is found.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Geofabrik.java