Geocoding systems most general goal is to transform a free textual description of a place into direct coordinates that allow to locate the place on a map. These systems have become more and more important with the increasing volumes of unstructured spatial information available online. Recently Qwant Maps chose to participate actively to the developement of Mimirsbrunn (Mimir for short), an open source software that geocode users' queries in order to provide them with autocompletion. Through Mimir users are able to look for four different types of places: addresses, points of interest, administrative regions and streets. These places could be located anywhere in the world. Since the users queries are not structured Mimir has to deal with imperfect and inaccurate queries. Queries are said imperfect when they contain mistakes, abbreviations, expressions or wrong format for addresses or administrative zones for instance. Inaccurate queries correspond to users that do not know the exact name of the place they are looking for. With Mimir we developed specific heuristics and tools to solve these problems. Cosmogony is one of these tools. The purpose of Cosmogony is to map any administrative region existing in OpenStreetMap with an entry in a global hierarchy that provides us an easy way to know that "Butte-aux-Cailles" or "Prenzlauer Berg" are both districts from Paris and Berlin respectively. This knowledge is then used to feed Mimir with a complete gazetteer of all the administrative regions in the world. In this talk we propose to present the details of the heuristics of the Mimir geocoder. In particular our presentation includes an exhaustive description of Cosmogony.