Search in sources :

Example 6 with QueryIndex

use of org.apache.jackrabbit.oak.spi.query.QueryIndex in project jackrabbit-oak by apache.

the class AggregateIndexProvider method getQueryIndexes.

@Override
@Nonnull
public List<? extends QueryIndex> getQueryIndexes(NodeState state) {
    List<? extends QueryIndex> list = baseProvider.getQueryIndexes(state);
    List<QueryIndex> newList = new ArrayList<QueryIndex>();
    for (QueryIndex index : list) {
        if (index instanceof AdvanceFulltextQueryIndex) {
            index = new AggregateIndex((AdvanceFulltextQueryIndex) index);
        }
        newList.add(index);
    }
    return newList;
}
Also used : AdvanceFulltextQueryIndex(org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvanceFulltextQueryIndex) ArrayList(java.util.ArrayList) QueryIndex(org.apache.jackrabbit.oak.spi.query.QueryIndex) AdvanceFulltextQueryIndex(org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvanceFulltextQueryIndex) Nonnull(javax.annotation.Nonnull)

Aggregations

QueryIndex (org.apache.jackrabbit.oak.spi.query.QueryIndex)6 AdvancedQueryIndex (org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvancedQueryIndex)5 IndexPlan (org.apache.jackrabbit.oak.spi.query.QueryIndex.IndexPlan)5 ArrayList (java.util.ArrayList)3 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 Nonnull (javax.annotation.Nonnull)1 Blob (org.apache.jackrabbit.oak.api.Blob)1 ArrayBasedBlob (org.apache.jackrabbit.oak.plugins.memory.ArrayBasedBlob)1 FilterImpl (org.apache.jackrabbit.oak.query.index.FilterImpl)1 TraversingIndex (org.apache.jackrabbit.oak.query.index.TraversingIndex)1 SelectorExecutionPlan (org.apache.jackrabbit.oak.query.plan.SelectorExecutionPlan)1 AdvanceFulltextQueryIndex (org.apache.jackrabbit.oak.spi.query.QueryIndex.AdvanceFulltextQueryIndex)1 OrderEntry (org.apache.jackrabbit.oak.spi.query.QueryIndex.OrderEntry)1 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)1 NodeState (org.apache.jackrabbit.oak.spi.state.NodeState)1 Test (org.junit.Test)1