Restructuring functionality for retrieval of network neighborhoods