Skip to content

LUTECE-2224 : Allow client calls to pass StringBuffer to SearchIndexe… #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private static void processFullIndexing( )
_sbLogs.append( "</strong>\r\n" );

// the indexer will call write(doc)
indexer.indexDocuments( );
indexer.indexDocuments( _sbLogs );
}
}
catch( Exception e )
Expand Down Expand Up @@ -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 );
}

/**
Expand Down
16 changes: 16 additions & 0 deletions src/java/fr/paris/lutece/portal/service/search/SearchIndexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ public interface SearchIndexer
*/
void indexDocuments( ) throws IOException, InterruptedException, SiteMessageException;

/**
* Index all lucene documents from the plugin, replace List&lt;Document&gt; 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
*
Expand Down