If you need to re-index all resources in greg 4.0.0, here I have explain how you can do that.
This can be easily done by editing registry.xml located at CARBON_HOME/repository/conf folder. In registry.xml go to the indexingConfiguration section and then change the resource name of lastAccessTimeLocation to some other value.
New Value (after changing the resource name):
Now restart the server, then greg will re-index all resources from scratch.