@@ -0,0 +1,1078 @@
+package org.clarksnut.migration;%0A%0Aimport org.clarksnut.models.jpa.JpaImportedDocumentProvider;%0Aimport org.hibernate.search.jpa.FullTextEntityManager;%0Aimport org.hibernate.search.jpa.Search;%0Aimport org.jboss.logging.Logger;%0A%0Aimport javax.annotation.PostConstruct;%0Aimport javax.ejb.Singleton;%0Aimport javax.ejb.Startup;%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.PersistenceContext;%0A%0A@Startup%0A@Singleton%0Apublic class LuceneReindex %7B%0A%0A    private static final Logger logger = Logger.getLogger(JpaImportedDocumentProvider.class);%0A%0A    @PersistenceContext%0A    private EntityManager em;%0A%0A    @PostConstruct%0A    public void init() %7B%0A        FullTextEntityManager fullTextEm = Search.getFullTextEntityManager(em);%0A        try %7B%0A            logger.info(%22Trying to reindex lucene...%22);%0A%0A            fullTextEm%0A                    .createIndexer()%0A                    .startAndWait();%0A%0A            logger.info(%22Index process finished%22);%0A        %7D catch (InterruptedException e) %7B%0A            logger.error(%22Fatal error. Lucene could not re indexed%22);%0A        %7D%0A    %7D%0A%7D%0A

add re indexaction of hibernate lucene