* Also each new IndexWriter needs a new MergePolicy.
*/
private IndexWriter createNewIndexWriter(DirectoryProvider<?> directoryProvider, IndexWriterConfig writerConfig, ParameterSet indexingParameters) throws IOException {
LogByteSizeMergePolicy newMergePolicy = indexingParameters.getNewMergePolicy(); //TODO make it possible to configure a different policy?
writerConfig.setMergePolicy( newMergePolicy );
MergeScheduler mergeScheduler = new ConcurrentMergeScheduler( this.errorHandler );
writerConfig.setMergeScheduler( mergeScheduler );
IndexWriter writer = new IndexWriter( directoryProvider.getDirectory(), writerConfig );
return writer;
}