You can trigger an asynchronous re-indexing of a local Pub repository either through the UI or using the REST API.
In the Artifact Tree Browser, select your Pub repository, right-click and select Recalculate Index from the list (requires Admin privileges).
To re-index a Pub repository through the REST API, see Calculate Pub Repository Metadata.