Create master detail index