QueryIndex.OrderEntry oe,
List<QueryIndex.IndexPlan> plans) {
String propertyName = PathUtils.getName(oe.getPropertyName());
NodeState definition = getIndexNode(root, propertyName, filter);
if (definition != null) {
Order order = OrderDirection.isAscending(definition)
? Order.ASCENDING : Order.DESCENDING;
long entryCount = getStrategy(definition).count(definition, (PropertyRestriction) null, MAX_COST);
QueryIndex.IndexPlan.Builder b = OrderedPropertyIndex.getIndexPlanBuilder(filter);
b.setSortOrder(ImmutableList.of(new QueryIndex.OrderEntry(oe.getPropertyName(), Type.UNDEFINED, order)));
b.setEstimatedEntryCount(entryCount);