diff --git a/src/main/java/info/bukova/isspst/services/FullTextServiceImpl.java b/src/main/java/info/bukova/isspst/services/FullTextServiceImpl.java index 12dee947..c2583459 100644 --- a/src/main/java/info/bukova/isspst/services/FullTextServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/FullTextServiceImpl.java @@ -5,17 +5,6 @@ import info.bukova.isspst.dao.QueryDao; import info.bukova.isspst.data.BaseData; import info.bukova.isspst.data.User; import info.bukova.isspst.sort.ReflectionTools; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import org.apache.lucene.search.Query; import org.hibernate.Hibernate; import org.hibernate.search.FullTextSession; @@ -28,6 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.*; + public class FullTextServiceImpl implements FullTextService { @Autowired @@ -48,11 +43,7 @@ public class FullTextServiceImpl implements FullTextService { Logger logger = LoggerFactory.getLogger(FullTextServiceImpl.class); logger.info("Indexing database for fulltext search"); FullTextSession ftSession = Search.getFullTextSession(queryDao.getSession()); - try { - ftSession.createIndexer().startAndWait(); - } catch (InterruptedException e) { - logger.error("Cannot index database"); - } + ftSession.createIndexer().start(); } @Override