use of org.apache.jackrabbit.oak.spi.query.QueryIndexProvider in project jackrabbit-oak by apache.
the class AtomicCounterIT method setup.
@Before
public void setup() throws Exception {
DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
NodeBuilder builder = ns.getRoot().builder();
NodeBuilder index = builder.child(INDEX_DEFINITIONS_NAME);
NodeBuilder lucene = newLuceneIndexDefinition(index, "lucene", ImmutableSet.of("String"), null, "async");
lucene.setProperty("async", of("async", "nrt"), STRINGS);
IndexDefinition.updateDefinition(index.child("lucene"));
ns.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
LuceneIndexEditorProvider editorProvider = new LuceneIndexEditorProvider();
editorProvider.setIndexingQueue(mock(DocumentQueue.class));
LuceneIndexProvider provider = new LuceneIndexProvider();
ContentRepository repository = new Oak(ns).with(// Clusterable
ns).with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(editorProvider).with(executorService).withAtomicCounter().withAsyncIndexing("async", 1).withFailOnMissingIndexProvider().createContentRepository();
session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()), null);
while (isReindexing(session)) {
Thread.sleep(100);
}
}
use of org.apache.jackrabbit.oak.spi.query.QueryIndexProvider in project jackrabbit-oak by apache.
the class LuceneIndexAugmentTest method createRepository.
@Override
protected ContentRepository createRepository() {
LuceneIndexEditorProvider editorProvider = new LuceneIndexEditorProvider(null, new ExtractedTextCache(0, 0), factory, Mounts.defaultMountInfoProvider());
LuceneIndexProvider provider = new LuceneIndexProvider(tracker, ScorerProviderFactory.DEFAULT, factory);
return new Oak().with(new OpenSecurityProvider()).with((QueryIndexProvider) provider).with((Observer) provider).with(editorProvider).createContentRepository();
}
use of org.apache.jackrabbit.oak.spi.query.QueryIndexProvider in project jackrabbit-oak by apache.
the class LuceneOakRepositoryStub method preCreateRepository.
@Override
protected void preCreateRepository(Jcr jcr) {
LuceneIndexProvider provider = new LuceneIndexProvider().with(getNodeAggregator());
jcr.with(new LuceneCompatModeInitializer("luceneGlobal", (Set<String>) null)).with((QueryIndexProvider) provider).with((Observer) provider).withFastQueryResultSize(true).with(new LuceneIndexEditorProvider());
}
Aggregations