diff --git a/src/java/fr/paris/lutece/portal/service/search/IndexationService.java b/src/java/fr/paris/lutece/portal/service/search/IndexationService.java index a62216e363..6be04cd9a8 100644 --- a/src/java/fr/paris/lutece/portal/service/search/IndexationService.java +++ b/src/java/fr/paris/lutece/portal/service/search/IndexationService.java @@ -293,7 +293,7 @@ private static void processFullIndexing( ) _sbLogs.append( "\r\n" ); // the indexer will call write(doc) - indexer.indexDocuments( ); + indexer.indexDocuments( _sbLogs ); } } catch( Exception e ) @@ -363,7 +363,7 @@ private static void processIncrementalIndexing( ) throws CorruptIndexException, // reindexing all pages. _writer.deleteDocuments( new Term( SearchItem.FIELD_TYPE, PARAM_TYPE_PAGE ) ); - _mapIndexers.get( PageIndexer.INDEXER_NAME ).indexDocuments( ); + _mapIndexers.get( PageIndexer.INDEXER_NAME ).indexDocuments( _sbLogs ); } /** diff --git a/src/java/fr/paris/lutece/portal/service/search/SearchIndexer.java b/src/java/fr/paris/lutece/portal/service/search/SearchIndexer.java index cb1449e0e0..4b6cc6eaf5 100644 --- a/src/java/fr/paris/lutece/portal/service/search/SearchIndexer.java +++ b/src/java/fr/paris/lutece/portal/service/search/SearchIndexer.java @@ -58,6 +58,22 @@ public interface SearchIndexer */ void indexDocuments( ) throws IOException, InterruptedException, SiteMessageException; + /** + * Index all lucene documents from the plugin, replace List<Document> getDocuments( ) method + * + * @param sbLogs + * Le logger + * @throws IOException + * If an IO error occured + * @throws InterruptedException + * If a thread error occured + * @throws SiteMessageException + * occurs when a site message need to be displayed + */ + default void indexDocuments( StringBuffer sbLogs ) throws IOException, InterruptedException, SiteMessageException + { + indexDocuments( ); + } /** * Returns a List of lucene documents to add to the index *