How to add custom attributes to Algolia search autocomplete popup in Magento 2

I need to add product custom attributes in autocomplete popup. There are topics for same for Magento 1 but i need to do it for Magento2. Has anyone faced such task and can provide way to do it?