Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.49 KB | None | 0 0
  1. import com.liferay.portal.kernel.search.Indexer
  2. import com.liferay.portal.kernel.search.IndexerRegistryUtil
  3. import com.liferay.portlet.journal.model.JournalArticle
  4. import com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil
  5.  
  6. Indexer jaIndexer = IndexerRegistryUtil.getIndexer(JournalArticle.class);
  7.  
  8. def articles = JournalArticleLocalServiceUtil.getArticles()
  9. articles.each { JournalArticle item ->
  10.     jaIndexer.reindex(JournalArticle.class.getName(), item.getResourcePrimKey());
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement