Mapers and reducers for getting d-index.