public class OrderedPropertyIndex extends Object implements QueryIndex, QueryIndex.AdvancedQueryIndex
QueryIndex.AdvancedQueryIndex, QueryIndex.AdvanceFulltextQueryIndex, QueryIndex.FulltextQueryIndex, QueryIndex.IndexPlan, QueryIndex.NativeQueryIndex, QueryIndex.OrderEntry
Constructor and Description |
---|
OrderedPropertyIndex() |
Modifier and Type | Method and Description |
---|---|
double |
getCost(Filter filter,
NodeState root)
retrieve the cost for the query.
|
String |
getIndexName()
Get the unique index name.
|
String |
getPlan(Filter filter,
NodeState root)
Get the query plan for the given filter.
|
String |
getPlanDescription(QueryIndex.IndexPlan plan,
NodeState root)
Get the query plan description (for logging purposes).
|
List<QueryIndex.IndexPlan> |
getPlans(Filter filter,
List<QueryIndex.OrderEntry> sortOrder,
NodeState root)
Return the possible index plans for the given filter and sort order.
|
Cursor |
query(Filter filter,
NodeState root)
Query the index.
|
Cursor |
query(QueryIndex.IndexPlan plan,
NodeState root)
Start a query.
|
public String getIndexName()
QueryIndex
getIndexName
in interface QueryIndex
public double getCost(Filter filter, NodeState root)
getCost
in interface QueryIndex
filter
- the filterroot
- root state of the current repository snapshotpublic List<QueryIndex.IndexPlan> getPlans(Filter filter, List<QueryIndex.OrderEntry> sortOrder, NodeState root)
QueryIndex.AdvancedQueryIndex
getPlans
in interface QueryIndex.AdvancedQueryIndex
filter
- the filtersortOrder
- the sort order or null if no sorting is requiredroot
- root state of the current repository snapshotpublic String getPlanDescription(QueryIndex.IndexPlan plan, NodeState root)
QueryIndex.AdvancedQueryIndex
The index plan is one of the plans that the index returned in the getPlans call.
getPlanDescription
in interface QueryIndex.AdvancedQueryIndex
plan
- the index planroot
- root state of the current repository snapshotpublic Cursor query(QueryIndex.IndexPlan plan, NodeState root)
QueryIndex.AdvancedQueryIndex
The index plan is one of the plans that the index returned in the getPlans call.
query
in interface QueryIndex.AdvancedQueryIndex
plan
- the index plan to useroot
- root state of the current repository snapshotpublic String getPlan(Filter filter, NodeState root)
QueryIndex
EXPLAIN SELECT
query, or for logging purposes. The
result should be human readable.getPlan
in interface QueryIndex
filter
- the filterroot
- root state of the current repository snapshotpublic Cursor query(Filter filter, NodeState root)
QueryIndex
An implementation should only filter the result if it can do so easily and efficiently; the query engine will verify the data again (in memory) and check for access rights.
The method is only called if this index is used for the given query and
selector, which is only the case if the given index implementation
returned the lowest cost for the given filter. If the implementation
returned Double.MAX_VALUE
in the getCost method for the given
filter, then this method is not called. If it is still called, then it is
supposed to throw an exception (as it would be an internal error of the
query engine).
query
in interface QueryIndex
filter
- the filterroot
- root state of the current repository snapshot"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"