Search in sources :

Example 1 with ElasticGlobalInitializer

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);
}
Also used : ExtractedTextCache(org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache) ElasticGlobalInitializer(org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer) OakRepositoryFixture(org.apache.jackrabbit.oak.fixture.OakRepositoryFixture) ElasticIndexTracker(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker) Jcr(org.apache.jackrabbit.oak.jcr.Jcr) ElasticMetricHandler(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticMetricHandler) ElasticIndexProvider(org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider) ElasticIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider)

Example 2 with ElasticGlobalInitializer

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);
}
Also used : ExtractedTextCache(org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache) ElasticGlobalInitializer(org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer) OakRepositoryFixture(org.apache.jackrabbit.oak.fixture.OakRepositoryFixture) ElasticIndexTracker(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker) Jcr(org.apache.jackrabbit.oak.jcr.Jcr) ElasticMetricHandler(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticMetricHandler) ElasticIndexProvider(org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider) ElasticIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider)

Example 3 with ElasticGlobalInitializer

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);
}
Also used : ExtractedTextCache(org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache) ElasticGlobalInitializer(org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer) OakRepositoryFixture(org.apache.jackrabbit.oak.fixture.OakRepositoryFixture) NodeTypeIndexProvider(org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider) ElasticIndexTracker(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker) Jcr(org.apache.jackrabbit.oak.jcr.Jcr) ElasticMetricHandler(org.apache.jackrabbit.oak.plugins.index.elastic.ElasticMetricHandler) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) ElasticIndexProvider(org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider) ElasticIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider)

Aggregations

ElasticGlobalInitializer (org.apache.jackrabbit.oak.benchmark.util.ElasticGlobalInitializer)3 OakRepositoryFixture (org.apache.jackrabbit.oak.fixture.OakRepositoryFixture)3 Jcr (org.apache.jackrabbit.oak.jcr.Jcr)3 ElasticIndexTracker (org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexTracker)3 ElasticMetricHandler (org.apache.jackrabbit.oak.plugins.index.elastic.ElasticMetricHandler)3 ElasticIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexEditorProvider)3 ElasticIndexProvider (org.apache.jackrabbit.oak.plugins.index.elastic.query.ElasticIndexProvider)3 ExtractedTextCache (org.apache.jackrabbit.oak.plugins.index.search.ExtractedTextCache)3 NodeTypeIndexProvider (org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider)1 PropertyIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider)1