Hi Rohan,
I would sugggest you to go with the below document approach. By Using this approach you will be able to sort data for your custom fields, Excel download and put your Z data to your collection before calling Do_prepare_output and get methods.
Search Result Enhancement with custom z fields
Regards,
Sumeet
Moderator: Bagging for points is prohibited by Rules of Engagement.
Message was edited by: Andrei Vishnevsky