fix reindex resources

Now the resource that has been edited will be indexed and not a hard-coded one