Examples of restrictProperty()


Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

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

        QueryIndex queryIndex = new LuceneIndex(analyzer, null);
        FilterImpl filter = createFilter(NT_BASE);
        // filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty("foo", Operator.EQUAL,
                PropertyValues.newString("bar"));
        Cursor cursor = queryIndex.query(filter, indexed);

        assertTrue(cursor.hasNext());
        assertEquals("/a", cursor.next().getPath());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        NodeState after = builder.getNodeState();

        UUIDDiffCollector collector = new UUIDDiffCollector(root, after);

        FilterImpl f = new FilterImpl(null, null);
        f.restrictProperty("jcr:uuid", Operator.EQUAL,
                PropertyValues.newString("abc"));

        Set<String> result = collector.getResults(f);
        Iterator<String> iterator = result.iterator();
        assertTrue(iterator.hasNext());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        NodeState after = builder.getNodeState();

        UUIDDiffCollector collector = new UUIDDiffCollector(before, after);

        FilterImpl f = new FilterImpl(null, null);
        f.restrictProperty("jcr:uuid", Operator.EQUAL,
                PropertyValues.newString("xyz"));

        Set<String> result = collector.getResults(f);
        Iterator<String> iterator = result.iterator();
        assertTrue(iterator.hasNext());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        NodeState after = builder.getNodeState();

        UUIDDiffCollector collector = new UUIDDiffCollector(before, after);

        FilterImpl f = new FilterImpl(null, null);
        f.restrictProperty("jcr:uuid", Operator.EQUAL, PropertyValues
                .newString("ee59b554-76b7-3e27-9fc6-15bda1388894"));

        Set<String> result = collector.getResults(f);
        Iterator<String> iterator = result.iterator();
        assertTrue(iterator.hasNext());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        // "rep:excerpt is not null" to let the index know that
        // we will need the excerpt
        for (ColumnImpl c : query.getColumns()) {
            if (c.getSelector() == this) {
                if (c.getColumnName().equals("rep:excerpt")) {
                    f.restrictProperty("rep:excerpt", Operator.NOT_EQUAL, null);
                }
            }
        }
       
        // all conditions can be pushed to the selectors -
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        root.commit(DefaultConflictHandler.OURS);

        QueryIndex index = new LuceneIndex(store, "jcr:system", "oak:lucene");
        FilterImpl filter = new FilterImpl(null);
        filter.restrictPath("/", Filter.PathRestriction.EXACT);
        filter.restrictProperty(
                "foo",
                Operator.EQUAL,
                MemoryValueFactory.INSTANCE.createValue("bar"));
        Cursor cursor = index.query(filter, null);
        assertTrue(cursor.next());
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        indexMeta = EmptyNodeState.EMPTY_NODE.builder();
        indexMeta.setChildNode(IndexConstants.INDEX_CONTENT_NODE_NAME, index.getNodeState());

        // querying >= 002
        filter = new FilterImpl();
        filter.restrictProperty(propertyName, Operator.GREATER_OR_EQUAL,
            PropertyValues.newString(KEYS[2]));

        resultset = ascending.query(filter, "indexName", indexMeta.getNodeState(),
            filter.getPropertyRestriction(propertyName)).iterator();
       
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        assertEquals("path/f", resultset.next());
        assertFalse("We should have not any results left", resultset.hasNext());
       
        //querying <= 002
        filter = new FilterImpl();
        filter.restrictProperty(propertyName, Operator.LESS_OR_EQUAL,
            PropertyValues.newString(KEYS[2]));
       
        resultset = ascending.query(filter, "indexName", indexMeta.getNodeState(),
            filter.getPropertyRestriction(propertyName)).iterator();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        indexMeta = EmptyNodeState.EMPTY_NODE.builder();
        indexMeta.setChildNode(IndexConstants.INDEX_CONTENT_NODE_NAME, index.getNodeState());
       
        // querying >= 003
        filter = new FilterImpl();
        filter.restrictProperty(propertyName, Operator.GREATER_OR_EQUAL,
            PropertyValues.newString(KEYS[3]));

        resultset = descending.query(filter, "indexName", indexMeta.getNodeState(),
            filter.getPropertyRestriction(propertyName)).iterator();
View Full Code Here

Examples of org.apache.jackrabbit.oak.query.index.FilterImpl.restrictProperty()

        assertEquals("path/c", resultset.next());
        assertFalse("We should have not any results left", resultset.hasNext());

        // querying <= 003
        filter = new FilterImpl();
        filter.restrictProperty(propertyName, Operator.LESS_OR_EQUAL,
            PropertyValues.newString(KEYS[3]));

        resultset = descending.query(filter, "indexName", indexMeta.getNodeState(),
            filter.getPropertyRestriction(propertyName)).iterator();
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.