Package org.apache.jackrabbit.oak.spi.query

Examples of org.apache.jackrabbit.oak.spi.query.QueryIndexProvider


    static final String SOLR_HOME_PATH = "target/test-classes/solr";
    static final String SOLRCONFIG_PATH = "target/test-classes/solr/solr.xml";

    public static QueryIndexProvider getTestQueryIndexProvider(final SolrServer solrServer, final OakSolrConfiguration configuration) {
        return new QueryIndexProvider() {
            @Nonnull
            @Override
            public List<? extends QueryIndex> getQueryIndexes(NodeState nodeState) {
                List<QueryIndex> tempIndexes = new ArrayList<QueryIndex>();
                for (IndexDefinition child : buildIndexDefinitions(nodeState, "/",
View Full Code Here


        whiteboard.register(Executor.class, executor, Collections.emptyMap());

        IndexEditorProvider indexEditors = CompositeIndexEditorProvider.compose(indexEditorProviders);
        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexEditors);

        QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);

        List<CommitHook> initHooks = new ArrayList<CommitHook>(commitHooks);
        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));
View Full Code Here

    public ContentRepository createContentRepository() {
        IndexEditorProvider indexEditors = CompositeIndexEditorProvider.compose(indexEditorProviders);
        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexEditors);

        QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);

        List<CommitHook> initHooks = new ArrayList<CommitHook>(commitHooks);
        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));
View Full Code Here

    public QueryEngine getQueryEngine() {
        checkLive();
        return new QueryEngineImpl() {
            @Override
            protected ExecutionContext getExecutionContext() {
                QueryIndexProvider provider = indexProvider;
                if (hasPendingChanges()) {
                    provider = new UUIDDiffIndexProviderWrapper(
                            provider, getBaseState(), getRootState());
                }
                return new ExecutionContext(
View Full Code Here

    public QueryEngine getQueryEngine() {
        checkLive();
        return new QueryEngineImpl() {
            @Override
            protected ExecutionContext getExecutionContext() {
                QueryIndexProvider provider = indexProvider;
                if (hasPendingChanges()) {
                    provider = new UUIDDiffIndexProviderWrapper(
                            provider, getBaseState(), getRootState());
                }
                return new ExecutionContext(getBaseState(), rootTree, provider);
View Full Code Here

        super(QueryIndexProvider.class);
    }

    @Override @Nonnull
    public List<? extends QueryIndex> getQueryIndexes(NodeState nodeState) {
        QueryIndexProvider composite =
                CompositeQueryIndexProvider.compose(getServices());
        return composite.getQueryIndexes(nodeState);
    }
View Full Code Here

    @Override
    public Object addingService(ServiceReference reference) {
        Object service = context.getService(reference);
        if (service instanceof QueryIndexProvider) {
            QueryIndexProvider provider = (QueryIndexProvider) service;
            providers.put(reference, provider);
            return service;
        } else {
            context.ungetService(reference);
            return null;
View Full Code Here

                                 CommitHook commitHook) {

        nodeStore = new KernelNodeStore(microKernel);
        nodeStore.setHook(commitHook);

        QueryIndexProvider qip = indexProvider != null ? indexProvider
                : new CompositeQueryIndexProvider();
        queryEngine = new QueryEngineImpl(nodeStore, microKernel, qip);

        // TODO: use configurable context provider
        loginContextProvider = new LoginContextProviderImpl(this);
View Full Code Here

        createIndexNode();
    }

    @Override
    protected ContentRepository createRepository() {
        QueryIndexProvider indexer = new LuceneIndexProvider(DEFAULT_INDEX_HOME);
        QueryIndexProvider qip = new CompositeQueryIndexProvider(indexer);
        return new ContentRepositoryImpl(new MicroKernelImpl(), qip,
                new LuceneHook(DEFAULT_INDEX_HOME));
    }
View Full Code Here

       
        // MicroKernel mk = new MicroKernelImpl();
        // Indexer indexer = new Indexer(mk);

        PropertyIndexer pi = new PropertyIndexer(indexer);
        QueryIndexProvider qip = new CompositeQueryIndexProvider(pi);
        CompositeHook hook = new CompositeHook(pi);
        return new ContentRepositoryImpl(mk, qip, hook);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.query.QueryIndexProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.