Some questions about sync with MongoDB

Hi, I am very new to Algolia. We are using MongoDB and Express as our backend stacks, and I have used “algoliasearch” trying to sync algolia server with our database. But I am quite concerned about the correct way to handle DB id and ObjectID.

What I am trying to do right now is sending both DB id and ObjectID from client to server and using Promise.all to deal with them, but I got stuck on how to efficiently pass both DB id and ObjectID to client in the first place, since we have ObjectID or DB ID separately, these two identities are not linked. I am not sure if there is a better way to handle this problem.

Thanks in advance
Junchen