Examples of QueryEngineSettings


Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        SolrServer solrServer = mock(SolrServer.class);
        OakSolrConfiguration configuration = new DefaultSolrConfiguration();
        SolrQueryIndex solrQueryIndex = new SolrQueryIndex("solr", solrServer, configuration);

        FilterImpl filter = new FilterImpl(selector, "", new QueryEngineSettings());
        double cost = solrQueryIndex.getCost(filter, root);
        assertTrue(Double.POSITIVE_INFINITY == cost);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

*/
public class CursorsTest {

    @Test
    public void intersectionCursor() {
        QueryEngineSettings s = new QueryEngineSettings();
        Cursor a = new SimpleCursor("1:", "/b", "/c", "/e", "/e", "/c");
        Cursor b = new SimpleCursor("2:", "/a", "/c", "/d", "/b", "/c");
        Cursor c = Cursors.newIntersectionCursor(a, b, s);
        assertEquals("1:/b, 1:/c", list(c));
        assertFalse(c.hasNext());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        assertFalse(c.hasNext());
    }

    @Test
    public void intersectionCursorExceptions() {
        QueryEngineSettings s = new QueryEngineSettings();
        Cursor a = new SimpleCursor("1:", "/x", "/b", "/c", "/e", "/e", "/c");
        Cursor b = new SimpleCursor("2:", "/a", "/c", "/d", "/b", "/c");
        Cursor c = Cursors.newIntersectionCursor(a, b, s);
        c.next();
        c.next();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

                                 @Nonnull SecurityProvider securityProvider) {
        this.nodeStore = checkNotNull(nodeStore);
        this.commitHook = checkNotNull(commitHook);
        this.defaultWorkspaceName = checkNotNull(defaultWorkspaceName);
        this.securityProvider = checkNotNull(securityProvider);
        this.queryEngineSettings = queryEngineSettings != null ? queryEngineSettings : new QueryEngineSettings();
        this.indexProvider = indexProvider != null ? indexProvider : new CompositeQueryIndexProvider();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

    public Oak with(@Nonnull Whiteboard whiteboard) {
        this.whiteboard = checkNotNull(whiteboard);
        if (securityProvider instanceof WhiteboardAware) {
            ((WhiteboardAware) securityProvider).setWhiteboard(whiteboard);
        }
        QueryEngineSettings queryEngineSettings = WhiteboardUtils.getService(whiteboard, QueryEngineSettings.class);
        if (queryEngineSettings != null) {
            this.queryEngineSettings = queryEngineSettings;
        }
        return this;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        NodeState after = builder.getNodeState();

        NodeState indexed = hook.processCommit(before, after, CommitInfo.EMPTY);

        QueryIndex queryIndex = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(mock(SelectorImpl.class), "", new QueryEngineSettings());
        filter.restrictPath("/newnode", Filter.PathRestriction.EXACT);
        filter.restrictProperty("prop", Operator.EQUAL,
                PropertyValues.newString("val"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        NodeState after = builder.getNodeState();

        NodeState indexed = hook.processCommit(before, after, CommitInfo.EMPTY);

        QueryIndex queryIndex = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(mock(SelectorImpl.class), "", new QueryEngineSettings());
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
        Cursor cursor = queryIndex.query(filter, indexed);
        assertNotNull(cursor);
        assertTrue("no results found", cursor.hasNext());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        NodeState after = builder.getNodeState();

        NodeState indexed = hook.processCommit(before, after, CommitInfo.EMPTY);

        QueryIndex queryIndex = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(mock(SelectorImpl.class), "", new QueryEngineSettings());
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
        filter.restrictFulltextCondition("bar");
        Cursor cursor = queryIndex.query(filter, indexed);
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        tree.addChild("somenode");
        tree.addChild("someothernode");
        root.commit();

        QueryIndex index = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(mock(SelectorImpl.class), "", new QueryEngineSettings());
        filter.restrictPath("/somenode", Filter.PathRestriction.EXACT);
        Cursor cursor = index.query(filter, store.getRoot());
        assertCursor(cursor, "/somenode");
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.QueryEngineSettings

        Tree someothernode = tree.addChild("someothernode");
        someothernode.addChild("someotherchild");
        root.commit();

        QueryIndex index = new SolrQueryIndex("solr", server, configuration);
        FilterImpl filter = new FilterImpl(mock(SelectorImpl.class), "", new QueryEngineSettings());
        filter.restrictPath("/somenode", Filter.PathRestriction.DIRECT_CHILDREN);
        Cursor cursor = index.query(filter, store.getRoot());
        assertCursor(cursor, "/somenode/child1", "/somenode/child2");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.