Hello everyone i'm bulding a social media app. I'm planning to use elasticsearch as the search engine for the user search in the app. I'm using currently a PostGreSQL database as my source of truth, where all my users information are stored at. I'm looking for tips on how to implement elasticsearch, while still keeping my postgresql database as my primary database for storage.
When a user creates an account, I create a new row in my database. However, with elasticsearch as a search engine a want a near realtime update so as when someone creates an account, I may search for it instantly. Should I then, when a user creates an account create two requests, one for storing the data on my database and one for my elasticsearch instance?. If so, should I do this using the index API or bulk API (it is a single request for each user)?
Thnak you,