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

Examples of org.apache.jackrabbit.oak.plugins.index.PrefixIndex


    @Test
    public void test() {
        MicroKernel mk = new MicroKernelImpl();
        Indexer indexer = new Indexer(mk);
        indexer.init();
        PrefixIndex index = indexer.createPrefixIndex("d:");

        String head = mk.getHeadRevision();

        // meta data
        String meta = mk.getNodes(Indexer.INDEX_CONFIG_PATH, head, 1, 0, -1, null);
View Full Code Here


        index = index.substring(0, idx);
        JsopStream s = new JsopStream();
        s.array();
        if (index.startsWith(PropertyIndexConstants.TYPE_PREFIX)) {
            String prefix = index.substring(PropertyIndexConstants.TYPE_PREFIX.length());
            PrefixIndex prefixIndex = indexer.getPrefixIndex(prefix);
            if (prefixIndex == null) {
                throw ExceptionFactory.get("Unknown index: " + index);
            }
            Iterator<String> it = prefixIndex.getPaths(data, revisionId);
            while (it.hasNext()) {
                s.value(it.next());
            }
        } else if (index.startsWith(PropertyIndexConstants.TYPE_PROPERTY)) {
            String property = index.substring(PropertyIndexConstants.TYPE_PROPERTY.length());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.PrefixIndex

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.