Show progress bar for Mongo query - Spring boot project

I have a endpoint which we poll after every couple of secs to check the status of the mongo query.(We have queryId with us). Right now I have 2 status → Pending and Completed. Once status becomes completed we enable the UI and show the data.

I want to know if their is a way/solution out of the box by which I can show progress bar on UI for mongo query. It can be like 20%->50%->70% and so on.