Created
October 28, 2011 14:36
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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