Algolia Search mapping with Shopify Storefront API's (Different Product ID's)

We are using Shopify Storefront API’s in our e-commerce mobile application. To search products we are using Algolia Javascript API client. We are getting different Product ID’s from Algolia Search and GraphQL (Storefront API). How to proceed ?