use of org.apache.jackrabbit.oak.plugins.index.lucene.directory.FSDirectoryFactory in project jackrabbit-oak by apache.
the class DefaultIndexWriterTest method indexWriterConfig_Scheduler_Local.
@Test
public void indexWriterConfig_Scheduler_Local() throws Exception {
FSDirectoryFactory fsdir = new FSDirectoryFactory(folder.getRoot());
IndexDefinition defn = new IndexDefinition(root, builder.getNodeState(), "/foo");
DefaultIndexWriter writer = new DefaultIndexWriter(defn, builder, fsdir, INDEX_DATA_CHILD_NAME, SUGGEST_DATA_CHILD_NAME, true, writerConfig);
IndexWriter w = writer.getWriter();
assertThat(w.getConfig().getMergeScheduler(), instanceOf(ConcurrentMergeScheduler.class));
}
use of org.apache.jackrabbit.oak.plugins.index.lucene.directory.FSDirectoryFactory in project jackrabbit-oak by apache.
the class OutOfBandIndexer method createLuceneEditorProvider.
private IndexEditorProvider createLuceneEditorProvider() throws IOException {
LuceneIndexHelper luceneIndexHelper = indexHelper.getLuceneIndexHelper();
DirectoryFactory dirFactory = new FSDirectoryFactory(getLocalIndexDir());
luceneIndexHelper.setDirectoryFactory(dirFactory);
LuceneIndexEditorProvider provider = luceneIndexHelper.createEditorProvider();
provider.setWriterConfig(luceneIndexHelper.getWriterConfigForReindex());
return provider;
}
Aggregations