At the moment there is a single search_layer function used
for both index creation and searching.
In multi-threaded searches this causes
some 10% of the runtime to be spent waiting due to the Mutex locks.
The locks are only needed during index creation and could be disabled for searches.