Class PropertyIndexLookup

java.lang.Object
org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup

public class PropertyIndexLookup extends 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 a NodeState root.

 {
     NodeState state = ... // get a node state
     PropertyIndexLookup lookup = new PropertyIndexLookup(state);
     Set<String> hits = lookup.find("foo", PropertyValues.newString("xyz"));
 }
 
  • Field Details

    • COST_OVERHEAD

      public static final double COST_OVERHEAD
      The cost overhead to use the index in number of read operations.
      See Also:
  • Constructor Details

  • Method Details

    • isIndexed

      public boolean isIndexed(String propertyName, 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 name
      path - lookup path
      filter - for the node type restriction (null if no node type restriction)
      Returns:
      true if the property is indexed
    • query

      public Iterable<String> query(Filter filter, String propertyName, PropertyValue value)
    • getCost

      public double getCost(Filter filter, String propertyName, PropertyValue value)