jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1466443 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
Date Wed, 10 Apr 2013 12:21:10 GMT
Author: thomasm
Date: Wed Apr 10 12:21:10 2013
New Revision: 1466443

URL: http://svn.apache.org/r1466443
Log:
OAK-622 Improve QueryIndex interface (WIP; currently disabled)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java?rev=1466443&r1=1466442&r2=1466443&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
Wed Apr 10 12:21:10 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.jackrabbit.oak.spi.query;
 
+import java.util.List;
+
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
 /**
@@ -40,7 +42,7 @@ import org.apache.jackrabbit.oak.spi.sta
  * even thought it will be set in the filter.
  */
 public interface QueryIndex {
-
+    
     /**
      * Estimate the cost to query with the given filter. The returned
      * cost is a value between 1 (very fast; lookup of a unique node) and the
@@ -77,4 +79,109 @@ public interface QueryIndex {
      */
     String getIndexName();
 
+//    /**
+//     * Return the possible index plans for the given filter and sort order.
+//     * Please note this method is supposed to run quickly. That means it should
+//     * usually not read any data from the storage.
+//     *
+//     * @param filter the filter
+//     * @param sortOrder the sort order or null if no sorting is required
+//     * @param rootState root state of the current repository snapshot
+//     * @return the list of index plans (null if none)
+//     */
+//    List<IndexPlan> getPlans(Filter filter, List<Order> sortOrder, NodeState
rootState);
+//    
+//    /**
+//     * Get the query plan description (for logging purposes).
+//     *
+//     * @param plan the index plan
+//     * @return the query plan description
+//     */
+//    String getPlanDescription(IndexPlan plan);
+//    
+//    /**
+//     * Start a query. The filter and sort order of the index plan is to be used.
+//     *
+//     * @param plan the index plan to use
+//     * @param rootState root state of the current repository snapshot
+//     * @return a cursor to iterate over the result
+//     */
+//    Cursor query(IndexPlan plan, NodeState rootState);
+//    
+//    /**
+//     * An index plan.
+//     */
+//    public static class IndexPlan {
+//        
+//        /**
+//         * The cost to execute the query once. The returned value should
+//         * approximately match the number of disk read operations plus the
+//         * number of network roundtrips.
+//         */
+//        double costPerExecution;
+//        
+//        /**
+//         * The cost to read one entry from the cursor. The returned value should
+//         * approximately match the number of disk read operations plus the
+//         * number of network roundtrips.
+//         */
+//        double costPerEntry;
+//        
+//        /**
+//         * The estimated number of entries. This value does not have to be
+//         * accurate.
+//         */
+//        long estimatedEntryCount;
+//        
+//        /**
+//         * The filter to use.
+//         */
+//        Filter filter;
+//        
+//        /**
+//         * Whether transient (unsaved) changes are included.
+//         */
+//        boolean includeTransient;
+//
+//        /**
+//         * Whether the index is not always up-to-date.
+//         */
+//        boolean isDelayed;
+//        
+//        /**
+//         * Whether the fulltext part of the filter is evaluated (possibly with
+//         * an extended syntax). If set, the fulltext part of the filter is not
+//         * evaluated any more within the query engine.
+//         */
+//        boolean isFulltextIndex;
+//        
+//        /**
+//         * Whether the cursor is able to read all properties from a node.
+//         */
+//        boolean includesNodeData;
+//        
+//        /**
+//         * The sort order of the returned entries, or null if unsorted.
+//         */
+//        List<Order> sortOrder;
+//        
+//    }
+//    
+//    /**
+//     * A sort order entry.
+//     */
+//    static class Order {
+//        
+//        /**
+//         * The property name on where to sort.
+//         */
+//        String propertyName;
+//
+//        /**
+//         * True for descending, false for ascending.
+//         */
+//        boolean descending;
+//        
+//    }
+
 }



Mime
View raw message