See
Vespa map creation
for implementation details.