Algolia docSearch

I need to implement Algolia DocSearch into my docusaurus project. I have got the api key and api id from the algolia. But facing challenges on what to do next. Please guide me the steps that I should follow next.

I have completed the frontend structure of the search box but not sure how to add data. How can we implement the search functionality? Do we need to send our complete data to algolia or to add some indexing, I am not sure.