Skip to content

Instantly share code, notes, and snippets.

@rotty3000
Created October 28, 2011 14:36
Show Gist options
  • Save rotty3000/1322414 to your computer and use it in GitHub Desktop.
Save rotty3000/1322414 to your computer and use it in GitHub Desktop.
Groovy script for re-verifying and re-indexing Organizations from the script console
import com.liferay.portal.service.CompanyLocalServiceUtil
import com.liferay.portal.verify.VerifyOrganization
import com.liferay.portlet.usersadmin.util.OrganizationIndexer
vp = new VerifyOrganization()
vp.verify()
out << " Verify Done!"
indexer = new OrganizationIndexer();
def ids = []
CompanyLocalServiceUtil.companies.each {
ids.add(it.companyId)
}
indexer.reindex((String[])ids)
out << " Re-Index Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment