fetchGeonames

open override fun fetchGeonames(query: String, matchNamePrefix: Boolean, geonameType: GeonameType?, filter: List<Geoname>?): List<GeonameMatch>

Fetches geonames stored in the database. A geoname represents a geographic place.

query is a string that will be matched directly against geoname names. It is not a query string in the usual Suggest sense. match_name_prefix determines whether prefix matching is performed on names excluding abbreviations and airport codes. When true, names that start with query will match. When false, names that equal query will match.

geoname_type restricts returned geonames to a `GeonameType`.

filter restricts returned geonames to certain cities or regions. Cities can be restricted to regions by including the regions in filter, and regions can be restricted to those containing certain cities by including the cities in filter. This is especially useful since city and region names are not unique. filter is disjunctive: If any item in filter matches a geoname, the geoname will be filtered in.

The query can match a single geoname in more than one way. For example, it can match both a full name and an abbreviation. The returned vec of `GeonameMatch` values will include all matches for a geoname, one match per match_type per geoname. In other words, a matched geoname can map to more than one GeonameMatch.