In-memory leaf clustering -> mongoDB