use of org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer in project jackrabbit-oak by apache.
the class ElasticPropertyFTSeparatedIndexedContentAvailability method createRepository.
@Override
protected Repository[] createRepository(RepositoryFixture fixture) throws Exception {
elasticGlobalIndexName = TestHelper.getUniqueIndexName("elasticGlobal");
elasticTitleIndexName = TestHelper.getUniqueIndexName("elasticTitle");
if (fixture instanceof OakRepositoryFixture) {
currentFixtureName = fixture.toString();
return ((OakRepositoryFixture) fixture).setUpCluster(1, oak -> {
ElasticIndexTracker indexTracker = new ElasticIndexTracker(connection, new ElasticMetricHandler(StatisticsProvider.NOOP));
ElasticIndexEditorProvider editorProvider = new ElasticIndexEditorProvider(indexTracker, connection, new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
ElasticIndexProvider indexProvider = new ElasticIndexProvider(indexTracker);
oak.with(editorProvider).with(indexProvider).with(indexProvider).with((new ElasticGlobalInitializer(elasticGlobalIndexName, storageEnabled)).async("fulltext-async")).with(new FullTextPropertyInitialiser(elasticTitleIndexName, Collections.singleton("title"), ElasticIndexDefinition.TYPE_ELASTICSEARCH).async()).withAsyncIndexing("async", 5).withAsyncIndexing("fulltext-async", 5);
return new Jcr(oak);
});
}
return super.createRepository(fixture);
}
use of org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer in project jackrabbit-oak by apache.
the class ElasticPropertyFTIndexedContentAvailability method createRepository.
@Override
protected Repository[] createRepository(RepositoryFixture fixture) throws Exception {
elasticGlobalIndexName = TestHelper.getUniqueIndexName("elasticGlobal");
elasticTitleIndexName = TestHelper.getUniqueIndexName("elasticTitle");
if (fixture instanceof OakRepositoryFixture) {
currentFixtureName = fixture.toString();
return ((OakRepositoryFixture) fixture).setUpCluster(1, oak -> {
ElasticIndexTracker indexTracker = new ElasticIndexTracker(connection, new ElasticMetricHandler(StatisticsProvider.NOOP));
ElasticIndexEditorProvider editorProvider = new ElasticIndexEditorProvider(indexTracker, connection, new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
ElasticIndexProvider indexProvider = new ElasticIndexProvider(indexTracker);
oak.with(editorProvider).with(indexTracker).with(indexProvider).with((new ElasticGlobalInitializer(elasticGlobalIndexName, storageEnabled)).async()).with(new FullTextPropertyInitialiser(elasticTitleIndexName, Collections.singleton("title"), ElasticIndexDefinition.TYPE_ELASTICSEARCH).async()).withAsyncIndexing("async", 5);
return new Jcr(oak);
});
}
return super.createRepository(fixture);
}
use of org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer in project jackrabbit-oak by apache.
the class ElasticFullTextWithGlobalIndexSearchTest method createRepository.
@Override
protected Repository[] createRepository(RepositoryFixture fixture) throws Exception {
elasticGlobalIndexName = TestHelper.getUniqueIndexName("elasticGlobal");
if (fixture instanceof OakRepositoryFixture) {
return ((OakRepositoryFixture) fixture).setUpCluster(1, oak -> {
ElasticIndexTracker indexTracker = new ElasticIndexTracker(connection, new ElasticMetricHandler(StatisticsProvider.NOOP));
ElasticIndexEditorProvider editorProvider = new ElasticIndexEditorProvider(indexTracker, connection, new ExtractedTextCache(10 * FileUtils.ONE_MB, 100));
ElasticIndexProvider indexProvider = new ElasticIndexProvider(indexTracker);
oak.with(editorProvider).with(indexTracker).with(indexProvider).with(new PropertyIndexEditorProvider()).with(new NodeTypeIndexProvider()).with(new ElasticGlobalInitializer(elasticGlobalIndexName, storageEnabled)).with(new UUIDInitializer());
return new Jcr(oak);
});
}
return super.createRepository(fixture);
}
Aggregations