Class PropertyIndexLookup
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup
-
public class PropertyIndexLookup extends java.lang.Object
Is responsible for querying the property index content.
This class can be used directly on a subtree where there is an index defined by supplying aNodeState
root.{ NodeState state = ... // get a node state PropertyIndexLookup lookup = new PropertyIndexLookup(state); Set<String> hits = lookup.find("foo", PropertyValues.newString("xyz")); }
-
-
Field Summary
Fields Modifier and Type Field Description static double
COST_OVERHEAD
The cost overhead to use the index in number of read operations.
-
Constructor Summary
Constructors Constructor Description PropertyIndexLookup(NodeState root)
PropertyIndexLookup(NodeState root, MountInfoProvider mountInfoProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCost(Filter filter, java.lang.String propertyName, PropertyValue value)
boolean
isIndexed(java.lang.String propertyName, java.lang.String path, Filter filter)
Checks whether the named property is indexed somewhere along the given path.java.lang.Iterable<java.lang.String>
query(Filter filter, java.lang.String propertyName, PropertyValue value)
-
-
-
Field Detail
-
COST_OVERHEAD
public static final double COST_OVERHEAD
The cost overhead to use the index in number of read operations.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PropertyIndexLookup
public PropertyIndexLookup(NodeState root)
-
PropertyIndexLookup
public PropertyIndexLookup(NodeState root, MountInfoProvider mountInfoProvider)
-
-
Method Detail
-
isIndexed
public boolean isIndexed(java.lang.String propertyName, java.lang.String path, Filter filter)
Checks whether the named property is indexed somewhere along the given path. Lookup starts at the current path (at the root of this object) and traverses down the path.- Parameters:
propertyName
- property namepath
- lookup pathfilter
- for the node type restriction (null if no node type restriction)- Returns:
- true if the property is indexed
-
query
public java.lang.Iterable<java.lang.String> query(Filter filter, java.lang.String propertyName, PropertyValue value)
-
getCost
public double getCost(Filter filter, java.lang.String propertyName, PropertyValue value)
-
-