Package org.apache.jackrabbit.oak.query.index

Examples of org.apache.jackrabbit.oak.query.index.TraversingIndex


                best = index;
            }
        }

        if (bestCost == Double.POSITIVE_INFINITY && traversalFallback) {
            best = new TraversingIndex();
        }
        return best;
    }
View Full Code Here


            LOG.debug("cost using filter " + filter);
        }
        List<QueryIndex> indexes = new ArrayList<QueryIndex>(
                indexProvider.getQueryIndexes(rootState));
        if (traversalFallback) {
            indexes.add(new TraversingIndex());
        }

        double bestCost = Double.POSITIVE_INFINITY;
        for (QueryIndex index : indexes) {
            double cost = index.getCost(filter, rootState);
View Full Code Here

        FilterImpl f = createFilter(indexed, NT_BASE);

        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
        double cost = lookup.getCost(f, "foo",
                PropertyValues.newString("azerty"));
        double traversal = new TraversingIndex().getCost(f, indexed);

        assertTrue("Estimated cost for " + nodes
                + " nodes should not be higher than traversal (" + cost + ")",
                cost < traversal);
    }
View Full Code Here

                best = index;
            }
        }

        if (traversalEnabled) {
            QueryIndex traversal = new TraversingIndex();
            double cost = traversal.getCost(filter, rootState);
            if (cost < bestCost || bestCost == Double.POSITIVE_INFINITY) {
                bestCost = cost;
                best = traversal;
            }
        }
View Full Code Here

        FilterImpl f = createFilter(indexed, NT_BASE);

        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
        double cost = lookup.getCost(f, "foo",
                PropertyValues.newString("azerty"));
        double traversal = new TraversingIndex().getCost(f, indexed);

        assertTrue("Estimated cost for " + nodes
                + " nodes should not be higher than traversal (" + cost + ")",
                cost < traversal);
    }
View Full Code Here

            LOG.debug("cost using filter " + filter);
        }
        List<QueryIndex> indexes = new ArrayList<QueryIndex>(
                indexProvider.getQueryIndexes(rootState));
        if (traversalFallback) {
            indexes.add(new TraversingIndex());
        }

        double bestCost = Double.POSITIVE_INFINITY;
        for (QueryIndex index : indexes) {
            double cost = index.getCost(filter, rootState);
View Full Code Here

            if (cost < bestCost) {
                best = index;
            }
        }
        if (best == null) {
            best = new TraversingIndex(mk);
        }
        return best;
    }
View Full Code Here

                bestPlan = indexPlan;
            }
        }

        if (traversalEnabled) {
            QueryIndex traversal = new TraversingIndex();
            double cost = traversal.getCost(filter, rootState);
            if (LOG.isDebugEnabled()) {
                LOG.debug("cost for " + traversal.getIndexName() + " is " + cost);
            }
            if (cost < bestCost || bestCost == Double.POSITIVE_INFINITY) {
                bestCost = cost;
                bestIndex = traversal;
            }
View Full Code Here

                bestPlan = indexPlan;
            }
        }

        if (traversalEnabled) {
            QueryIndex traversal = new TraversingIndex();
            double cost = traversal.getCost(filter, rootState);
            if (LOG.isDebugEnabled()) {
                LOG.debug("cost for " + traversal.getIndexName() + " is " + cost);
            }
            if (cost < bestCost || bestCost == Double.POSITIVE_INFINITY) {
                bestCost = cost;
                bestIndex = traversal;
            }
View Full Code Here

            if (cost < bestCost) {
                best = index;
            }
        }
        if (best == null) {
            best = new TraversingIndex(mk);
        }
        return best;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.query.index.TraversingIndex

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.