Call the Reindex REST API to have more control on indexing.
Reindex POST API
Use this method to start the reindex process in a separate thread.
Example:
http://jira.yourorg.com/rest/gitplugin/1.0/index.json
Reindex GET API
Use this method to track messages for a particular thread.
Example:
http://jira.yourorg.com/rest/gitplugin/1.0/index.json?threadId=eafe58fc-d8de-42ff-8815-6fe5860b38d2