These instructions work for the iMAC, retina 5K end 2014 version comes with OSX Yosemite.
These instructions assume that your iMAC partitions or file systems has been damaged and you want to restore to the way most efficiency with fusion drive and the recovery partition, similar to what was built in the factory. Pure how to install OSX on a Fusion drive and keep the recovery disc function How can I perform a clean installation of Mac OS x for my iMAC, retina 5K late 2014 with drive of Fusion with the intact Recovery HD partition?