@Override public Cursor query(IndexPlan plan, NodeState rootState) { if (getNodeAggregator() == null) { // path-though return baseIndex.query(plan, rootState); } else if (!(plan instanceof AggregateIndexPlan)) { // remove the node type restriction plan.setFilter(newAggregationFilter(plan.getFilter(), null)); return newAggregationCursor(plan, rootState); } Filter filter = plan.getFilter(); AggregateIndexPlan aggPlan = (AggregateIndexPlan) plan; FullTextExpression constraint = filter.getFullTextConstraint(); return flatten(constraint, aggPlan, filter, rootState, ""); }
@Override public Cursor query(IndexPlan plan, NodeState rootState) { if (getNodeAggregator() == null) { // path-though return baseIndex.query(plan, rootState); } else if (!(plan instanceof AggregateIndexPlan)) { // remove the node type restriction plan.setFilter(newAggregationFilter(plan.getFilter(), null)); return newAggregationCursor(plan, rootState); } Filter filter = plan.getFilter(); AggregateIndexPlan aggPlan = (AggregateIndexPlan) plan; FullTextExpression constraint = filter.getFullTextConstraint(); return flatten(constraint, aggPlan, filter, rootState, ""); }
@Override public Cursor query(IndexPlan plan, NodeState rootState) { if (getNodeAggregator() == null) { // path-though return baseIndex.query(plan, rootState); } else if (!(plan instanceof AggregateIndexPlan)) { // remove the node type restriction plan.setFilter(newAggregationFilter(plan.getFilter(), null)); return newAggregationCursor(plan, rootState); } Filter filter = plan.getFilter(); AggregateIndexPlan aggPlan = (AggregateIndexPlan) plan; FullTextExpression constraint = filter.getFullTextConstraint(); return flatten(constraint, aggPlan, filter, rootState, ""); }
private Cursor newAggregationCursor(IndexPlan plan, NodeState rootState) { Cursor c = baseIndex.query(plan, rootState); // we possibly get results from a child, // so we need to wrap the cursor to do aggregation return new AggregationCursor(c, getNodeAggregator(), rootState); }
private Cursor newAggregationCursor(IndexPlan plan, NodeState rootState) { Cursor c = baseIndex.query(plan, rootState); // we possibly get results from a child, // so we need to wrap the cursor to do aggregation return new AggregationCursor(c, getNodeAggregator(), rootState); }
@Override public Cursor query(IndexPlan plan, NodeState rootState) { return cursorFactory.wrap(delegate.query(plan, rootState)); } }
private Cursor newAggregationCursor(IndexPlan plan, NodeState rootState) { Cursor c = baseIndex.query(plan, rootState); // we possibly get results from a child, // so we need to wrap the cursor to do aggregation return new AggregationCursor(c, getNodeAggregator(), rootState); }
@Override public Cursor query(Filter filter, NodeState rootState) { return delegate.query(filter, rootState); }