Package org.apache.jackrabbit.oak.plugins.index

Examples of org.apache.jackrabbit.oak.plugins.index.IndexHook.apply()


        builder.setProperty("foo", "bar");
        NodeState after = builder.getNodeState();

        IndexHook l = new LuceneIndexDiff(builder);
        after.compareAgainstBaseState(before, l);
        l.apply();
        l.close();

        IndexDefinition testDef = new IndexDefinitionImpl("lucene",
                TYPE_LUCENE, "/oak:index/lucene");
        QueryIndex queryIndex = new LuceneIndex(testDef);
View Full Code Here


        NodeState after = builder.getNodeState();

        IndexHook l = new LuceneIndexDiff(builder);
        after.compareAgainstBaseState(before, l);
        l.apply();
        l.close();

        IndexDefinition testDef = new IndexDefinitionImpl("lucene",
                TYPE_LUCENE, "/oak:index/lucene");
        QueryIndex queryIndex = new LuceneIndex(testDef);
View Full Code Here

        withoutIndex = System.nanoTime() - withoutIndex;

        // ... then see how adding an index affects the code
        IndexHook p = new PropertyIndexDiff(builder);
        after.compareAgainstBaseState(before, p);
        p.apply();
        p.close();

        lookup = new PropertyIndexLookup(builder.getNodeState());
        long withIndex = System.nanoTime();
        assertEquals(ImmutableSet.of("a", "b"), lookup.find("foo", "abc"));
View Full Code Here

        withoutIndex = System.nanoTime() - withoutIndex;

        // ... then see how adding an index affects the code
        IndexHook p = new PropertyIndexDiff(builder);
        after.compareAgainstBaseState(before, p);
        p.apply();
        p.close();

        lookup = new PropertyIndexLookup(builder.getNodeState());
        long withIndex = System.nanoTime();
        assertEquals(ImmutableSet.of("a", "b"), lookup.find("foo", "abc"));
View Full Code Here

        NodeState after = builder.getNodeState();

        // Add an index
        IndexHook p = new Property2IndexDiff(builder);
        after.compareAgainstBaseState(before, p);
        p.apply();
        p.close();

        // Query the index
        Property2IndexLookup lookup = new Property2IndexLookup(builder.getNodeState());
        assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc"));
View Full Code Here

        NodeState after = builder.getNodeState();

        // Add an index
        IndexHook p = new Property2IndexDiff(builder);
        after.compareAgainstBaseState(before, p);
        p.apply();
        p.close();

        // Query the index
        Property2IndexLookup lookup = new Property2IndexLookup(builder.getNodeState());
        assertEquals(ImmutableSet.of("a", "b"), find(lookup, "foo", "abc"));
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.