Interface QueryIndex.AdvancedQueryIndex

  • All Known Subinterfaces:
    QueryIndex.AdvanceFulltextQueryIndex
    All Known Implementing Classes:
    AggregateIndex, org.apache.jackrabbit.oak.plugins.index.search.spi.query.FulltextIndex, LuceneIndex, LucenePropertyIndex
    Enclosing interface:
    QueryIndex

    public static interface QueryIndex.AdvancedQueryIndex
    A query index that may support using multiple access orders (returning the rows in a specific order), and that can provide detailed information about the cost.
    • Method Detail

      • getPlans

        java.util.List<QueryIndex.IndexPlan> getPlans​(Filter filter,
                                                      java.util.List<QueryIndex.OrderEntry> sortOrder,
                                                      NodeState rootState)
        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.
        Parameters:
        filter - the filter
        sortOrder - the sort order or null if no sorting is required
        rootState - root state of the current repository snapshot
        Returns:
        the list of index plans (null if none)
      • getPlanDescription

        java.lang.String getPlanDescription​(QueryIndex.IndexPlan plan,
                                            NodeState root)
        Get the query plan description (for logging purposes).

        The index plan is one of the plans that the index returned in the getPlans call.

        Parameters:
        plan - the index plan
        root - root state of the current repository snapshot
        Returns:
        the query plan description
      • query

        Cursor query​(QueryIndex.IndexPlan plan,
                     NodeState rootState)
        Start a query. The filter and sort order of the index plan is to be used.

        The index plan is one of the plans that the index returned in the getPlans call.

        Parameters:
        plan - the index plan to use
        rootState - root state of the current repository snapshot
        Returns:
        a cursor to iterate over the result