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

Examples of org.apache.jackrabbit.oak.plugins.index.BTree.findFirst()


            // print(mk, tree);
        }
        // indexer.commitChanges();
        for (int i = 0; i < len; i++) {
            // log("#test " + i);
            Cursor c = tree.findFirst("" + i);
            if (c.hasNext()) {
                Assert.assertEquals("" + i, c.next());
            }
        }
        print(mk, tree);
View Full Code Here


            // print(mk, tree);
        }
        // indexer.commitChanges();
        print(mk, tree);
        for (int i = 0; i < len; i++) {
            Cursor c = tree.findFirst("" + i);
            Assert.assertFalse(c.hasNext());
        }
    }

    @Test
View Full Code Here

        } else {
            tree.add("1", "p2");
        }

        // search
        Cursor c = tree.findFirst("1");
        Assert.assertEquals("1", c.next());
        Assert.assertEquals("p1", c.getValue());
        if (unique) {
            Assert.assertFalse(c.hasNext());
        } else {
View Full Code Here

        for (int i = 0; i < 100; i++) {
            log("op #" + i);
            // print(mk, tree);
            int x = r.nextInt(10);
            boolean exists = treeMap.containsKey(x);
            Cursor c = tree.findFirst("" + x);
            boolean gotExists = c.hasNext();
            String x2 = null;
            if (gotExists) {
                x2 = c.next();
                if (!x2.equals("" + x)) {
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.