jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1421761 - in /jackrabbit/oak/trunk: oak-core/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/ oak-core/src/main/java/org/apache/jackrabbit/oak/plug...
Date Fri, 14 Dec 2012 09:24:11 GMT
Author: alexparvulescu
Date: Fri Dec 14 09:24:08 2012
New Revision: 1421761

URL: http://svn.apache.org/viewvc?rev=1421761&view=rev
Log:
OAK-511 Query PropertyIndex that stores the index content as nodes

Modified:
    jackrabbit/oak/trunk/oak-core/pom.xml
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexUpdate.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexHookProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiffTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
    jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Fri Dec 14 09:24:08 2012
@@ -51,6 +51,7 @@
                 org.apache.jackrabbit.oak.plugins.index,
                 org.apache.jackrabbit.oak.plugins.index.nodetype,
                 org.apache.jackrabbit.oak.plugins.index.property,
+                org.apache.jackrabbit.oak.plugins.index.p2,
                 org.apache.jackrabbit.oak.plugins.memory,
                 org.apache.jackrabbit.oak.plugins.name,
                 org.apache.jackrabbit.oak.plugins.nodetype,

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndex.java Fri Dec 14 09:24:08 2012
@@ -40,10 +40,10 @@ import com.google.common.collect.Sets;
 
 /**
  * <code>NodeTypeIndex</code> implements a {@link QueryIndex} using
- * {@link PropertyIndexLookup}s on <code>jcr:primaryType</code> and
+ * {@link Property2IndexLookup}s on <code>jcr:primaryType</code> and
  * <code>jcr:mixinTypes</code> to evaluate a node type restriction on
  * {@link Filter}. The cost for this index is the sum of the costs of the
- * {@link PropertyIndexLookup} for queries on <code>jcr:primaryType</code> and
+ * {@link Property2IndexLookup} for queries on <code>jcr:primaryType</code> and
  * <code>jcr:mixinTypes</code>.
  */
 class NodeTypeIndex implements QueryIndex, JcrConstants {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexLookup.java Fri Dec 14 09:24:08 2012
@@ -20,7 +20,7 @@ import java.util.Set;
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.PropertyValue;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
@@ -47,7 +47,7 @@ class NodeTypeIndexLookup implements Jcr
      *         otherwise.
      */
     public boolean isIndexed(String path) {
-        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
+        Property2IndexLookup lookup = new Property2IndexLookup(root);
         if (lookup.isIndexed(JCR_PRIMARYTYPE, path)
                 && lookup.isIndexed(JCR_MIXINTYPES, path)) {
             return true;
@@ -68,7 +68,7 @@ class NodeTypeIndexLookup implements Jcr
 
     public double getCost(Iterable<String> nodeTypes) {
         PropertyValue ntNames = PropertyValues.newName(nodeTypes);
-        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
+        Property2IndexLookup lookup = new Property2IndexLookup(root);
         return lookup.getCost(JCR_PRIMARYTYPE, ntNames)
                 + lookup.getCost(JCR_MIXINTYPES, ntNames);
     }
@@ -81,7 +81,7 @@ class NodeTypeIndexLookup implements Jcr
      */
     public Set<String> find(Iterable<String> nodeTypes) {
         Set<String> paths = Sets.newHashSet();
-        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
+        Property2IndexLookup lookup = new Property2IndexLookup(root);
         PropertyValue ntNames = PropertyValues.newName(nodeTypes);
         paths.addAll(lookup.find(JCR_PRIMARYTYPE, ntNames));
         paths.addAll(lookup.find(JCR_MIXINTYPES, ntNames));

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java Fri Dec 14 09:24:08 2012
@@ -25,6 +25,7 @@ import javax.annotation.Nullable;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.PropertyValue;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
@@ -112,15 +113,12 @@ public class Property2IndexLookup {
 
         NodeState state = getIndexDefinitionNode(name);
         if (state != null && state.getChildNode(":index") != null) {
-            NodeState property;
             state = state.getChildNode(":index");
             for (String p : Property2Index.encode(value)) {
-                property = state.getChildNode(p);
+                NodeState property = state.getChildNode(p);
                 if (property != null) {
                     // We have an entry for this value, so use it
-                    for (String path : property.getChildNodeNames()) {
-                        paths.add(path);
-                    }
+                    getMatchingPaths(property, "", paths);
                 }
             }
         } else {
@@ -161,16 +159,26 @@ public class Property2IndexLookup {
         return paths;
     }
 
+    private void getMatchingPaths(NodeState state, String path,
+            Set<String> paths) {
+        PropertyState ps = state.getProperty("match");
+        if (ps != null && !ps.isArray() && ps.getValue(Type.BOOLEAN)) {
+            paths.add(path);
+        }
+        for (ChildNodeEntry c : state.getChildNodeEntries()) {
+            String name = c.getName();
+            NodeState childState = c.getNodeState();
+            getMatchingPaths(childState, PathUtils.concat(path, name), paths);
+        }
+    }
+
     public double getCost(String name, PropertyValue value) {
         double cost = 0.0;
         NodeState state = getIndexDefinitionNode(name);
         if (state != null && state.getChildNode(":index") != null) {
             state = state.getChildNode(":index");
             for (String p : Property2Index.encode(value)) {
-                PropertyState property = state.getProperty(p);
-                if (property != null) {
-                    cost += property.count();
-                }
+                cost += countMatchingLeaves(state.getChildNode(p));
             }
         } else {
             cost = Double.POSITIVE_INFINITY;
@@ -178,6 +186,20 @@ public class Property2IndexLookup {
         return cost;
     }
 
+    static int countMatchingLeaves(NodeState state) {
+        if (state == null) {
+            return 0;
+        }
+        int count = 0;
+        if (state.getProperty("match") != null) {
+            count++;
+        }
+        for (ChildNodeEntry entry : state.getChildNodeEntries()) {
+            count += countMatchingLeaves(entry.getNodeState());
+        }
+        return count;
+    }
+
     /**
      * Get the node with the index definition node for the given property.
      * 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexUpdate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexUpdate.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexUpdate.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexUpdate.java Fri Dec 14 09:24:08 2012
@@ -19,8 +19,10 @@ package org.apache.jackrabbit.oak.plugin
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
 
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Queue;
 import java.util.Set;
 
 import javax.jcr.PropertyType;
@@ -28,6 +30,7 @@ import javax.jcr.PropertyType;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
+import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 
@@ -110,6 +113,9 @@ class Property2IndexUpdate {
                     paths = Sets.newHashSet();
                     map.put(key, paths);
                 }
+                if("".equals(path)){
+                    path = "/";
+                }
                 paths.add(path);
             }
         }
@@ -138,15 +144,46 @@ class Property2IndexUpdate {
             Set<String> paths = entry.getValue();
             if (index.hasChildNode(encoded)) {
                 NodeBuilder child = index.child(encoded);
+                Queue<NodeBuilder> parentQueue = new LinkedList<NodeBuilder>();
                 for (String rm : paths) {
-                    child.removeNode(rm);
+                    if (PathUtils.denotesRoot(rm)) {
+                        child.removeProperty("match");
+                    } else {
+                        NodeBuilder indexEntry = child;
+                        Iterator<String> segments = PathUtils.elements(rm)
+                                .iterator();
+                        while (segments.hasNext()) {
+                            String segment = segments.next();
+                            if (segments.hasNext()) {
+                                parentQueue.add(indexEntry);
+                                indexEntry = indexEntry.child(segment);
+                            } else {
+                                // last segment
+                                if (indexEntry.hasChildNode(segment)) {
+                                    indexEntry.removeNode(segment);
+                                }
+                            }
+                        }
+                    }
+                }
+                // prune the index: remove all children that have no children
+                // and no "match" property progressing bottom up
+                while (!parentQueue.isEmpty()) {
+                    NodeBuilder node = parentQueue.poll();
+                    for (String name : node.getChildNodeNames()) {
+                        NodeBuilder segment = node.child(name);
+                        if (segment.getChildNodeCount() == 0
+                                && segment.getProperty("match") == null) {
+                            segment.removeNode(name);
+                        }
+                    }
                 }
+                // finally remove the index node if empty
                 if (child.getChildNodeCount() == 0) {
                     index.removeNode(encoded);
                 }
             }
         }
-
         for (Map.Entry<String, Set<String>> entry : insert.entrySet()) {
             String encoded = entry.getKey();
             Set<String> paths = entry.getValue();
@@ -154,15 +191,19 @@ class Property2IndexUpdate {
             Iterator<String> addIterator = paths.iterator();
             while (addIterator.hasNext()) {
                 String add = addIterator.next();
-                if (!child.hasChildNode(add)) {
-                    child.child(add);
-                    addIterator.remove();
+                NodeBuilder indexEntry = child;
+                Iterator<String> segments = PathUtils.elements(add).iterator();
+                while (segments.hasNext()) {
+                    String segment = segments.next();
+                    indexEntry = indexEntry.child(segment);
                 }
+                indexEntry.setProperty("match", true);
             }
-            long childCount = child.getChildNodeCount();
-            if (childCount == 0) {
+            long matchCount = Property2IndexLookup.countMatchingLeaves(child
+                    .getNodeState());
+            if (matchCount == 0) {
                 index.removeNode(encoded);
-            } else if (unique && childCount > 1) {
+            } else if (unique && matchCount > 1) {
                 throw new CommitFailedException(
                         "Uniqueness constraint violated");
             }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java Fri Dec 14 09:24:08 2012
@@ -77,6 +77,7 @@ import com.google.common.collect.Sets;
  * @see QueryIndex
  * @see PropertyIndexLookup
  */
+@Deprecated
 class PropertyIndex implements QueryIndex {
 
     public static final String TYPE = "property";

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexDiff.java Fri Dec 14 09:24:08 2012
@@ -50,6 +50,7 @@ import org.apache.jackrabbit.oak.spi.sta
  * @see PropertyIndexLookup
  * 
  */
+@Deprecated
 class PropertyIndexDiff implements IndexHook {
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexHookProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexHookProvider.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexHookProvider.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexHookProvider.java Fri Dec 14 09:24:08 2012
@@ -24,6 +24,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.felix.scr.annotations.Service;
 import org.apache.jackrabbit.oak.plugins.index.IndexHook;
 import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 
 import com.google.common.collect.ImmutableList;
@@ -33,10 +34,12 @@ import com.google.common.collect.Immutab
  * 
  * @see PropertyIndexDiff
  * @see IndexHookProvider
+ * @deprecated please use the {@link Property2IndexHookProvider} instead
  * 
  */
 @Component
 @Service(IndexHookProvider.class)
+@Deprecated
 public class PropertyIndexHookProvider implements IndexHookProvider {
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java Fri Dec 14 09:24:08 2012
@@ -49,7 +49,10 @@ import com.google.common.collect.Sets;
  * }
  * </code>
  * </pre>
+ * 
+ * @deprecated please use the {@link Property2IndexLookup} instead
  */
+@Deprecated
 public class PropertyIndexLookup {
 
     private final NodeState root;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java Fri Dec 14 09:24:08 2012
@@ -20,6 +20,7 @@ import java.util.List;
 
 import javax.annotation.Nonnull;
 
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndex;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -33,8 +34,10 @@ import com.google.common.collect.Immutab
  * PropertyIndex instance, which is used for all indexes.
  * 
  * @see PropertyIndex
+ * @deprecated please use the {@link Property2IndexProvider} instead
  * 
  */
+@Deprecated
 public class PropertyIndexProvider implements QueryIndexProvider {
 
     @Override @Nonnull

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java Fri Dec 14 09:24:08 2012
@@ -41,6 +41,7 @@ import org.apache.jackrabbit.oak.spi.sta
  * The changes are temporarily added to an in-memory structure, and then applied
  * to the node.
  */
+@Deprecated
 class PropertyIndexUpdate {
 
     /**

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java Fri Dec 14 09:24:08 2012
@@ -68,13 +68,13 @@ public class InitialContent implements R
             index.setProperty(JCR_PRIMARYTYPE, NT_UNSTRUCTURED, Type.NAME); // TODO: use proper node type
             index.child("uuid")
                 .setProperty(JCR_PRIMARYTYPE, "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty("propertyNames", "jcr:uuid")
                 .setProperty("reindex", true)
                 .setProperty("unique", true);
             index.child("nodetype")
                 .setProperty(JCR_PRIMARYTYPE, "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty("reindex", true)
                 .setProperty(PropertyStates.createProperty(
                         "propertyNames",
@@ -84,19 +84,19 @@ public class InitialContent implements R
             // FIXME OAK-396: rep:principalName only needs to be unique if defined with user/group nodes -> add defining nt-info to uniqueness constraint otherwise ac-editing will fail.
             index.child("authorizableId")
                 .setProperty(JCR_PRIMARYTYPE, "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty("propertyNames", UserConstants.REP_AUTHORIZABLE_ID)
                 .setProperty("reindex", true)
                 .setProperty("unique", true);
             index.child("principalName")
                 .setProperty(JCR_PRIMARYTYPE, "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty("propertyNames", UserConstants.REP_PRINCIPAL_NAME)
                 .setProperty("reindex", true)
                 .setProperty("unique", true);
             index.child("members")
                 .setProperty(JCR_PRIMARYTYPE, "oak:queryIndexDefinition", Type.NAME)
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty("propertyNames", UserConstants.REP_MEMBERS)
                 .setProperty("reindex", true);
         }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/api/UniquePropertyTest.java Fri Dec 14 09:24:08 2012
@@ -20,7 +20,7 @@ import java.util.UUID;
 
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.Oak;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.util.NodeUtil;
 import org.junit.Test;
@@ -36,7 +36,7 @@ public class UniquePropertyTest {
     public void testUniqueness() throws CommitFailedException {
 
         Root root = new Oak()
-                .with(new PropertyIndexHookProvider())
+                .with(new Property2IndexHookProvider())
                 .with(new InitialContent()).createRoot();
 
         NodeUtil node = new NodeUtil(root.getTree("/"));

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiffTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiffTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiffTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerDiffTest.java Fri Dec 14 09:24:08 2012
@@ -29,7 +29,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -47,7 +47,7 @@ public class IndexHookManagerDiffTest {
         // diff
         builder.child("oak:index")
                 .child("existing")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         // this index is NOT the current update branch, it should NOT be seen by
@@ -56,7 +56,7 @@ public class IndexHookManagerDiffTest {
                 .child("other")
                 .child("oak:index")
                 .child("existing2")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
 
@@ -70,13 +70,13 @@ public class IndexHookManagerDiffTest {
                 .child("other")
                 .child("oak:index")
                 .child("index2")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         NodeState after = builder.getNodeState();
 
         IndexHookProvider provider = new CompositeIndexHookProvider(
-                new PropertyIndexHookProvider());
+                new Property2IndexHookProvider());
 
         // <type, <path, indexhook>>
         Map<String, Map<String, List<IndexHook>>> updates = new HashMap<String, Map<String, List<IndexHook>>>();
@@ -93,7 +93,7 @@ public class IndexHookManagerDiffTest {
         }
 
         Set<String> expected = newHashSet("/", "/test/other");
-        Set<String> found = updates.remove("property").keySet();
+        Set<String> found = updates.remove("p2").keySet();
         assertTrue("Expecting " + expected + " got " + found,
                 difference(found, expected).isEmpty());
         assertTrue(updates.isEmpty());

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexHookManagerTest.java Fri Dec 14 09:24:08 2012
@@ -20,14 +20,14 @@ import static org.apache.jackrabbit.JcrC
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
 
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexLookup;
 import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -55,7 +55,7 @@ public class IndexHookManagerTest {
         builder.child("oak:index")
                 .child("rootIndex")
                 .setProperty("propertyNames", "foo")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         builder.child("newchild")
@@ -63,7 +63,7 @@ public class IndexHookManagerTest {
                 .child("oak:index")
                 .child("subIndex")
                 .setProperty("propertyNames", "foo")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
 
@@ -76,7 +76,7 @@ public class IndexHookManagerTest {
         NodeState after = builder.getNodeState();
 
         IndexHookManager im = new IndexHookManager(
-                new CompositeIndexHookProvider(new PropertyIndexHookProvider()));
+                new CompositeIndexHookProvider(new Property2IndexHookProvider()));
         NodeState indexed = im.processCommit(before, after);
 
         // first check that the index content nodes exist
@@ -84,10 +84,10 @@ public class IndexHookManagerTest {
         checkPathExists(indexed, "newchild", "other", "oak:index", "subIndex",
                 ":index");
 
-        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
+        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), lookup.find("foo", "abc"));
 
-        PropertyIndexLookup lookupChild = new PropertyIndexLookup(indexed
+        Property2IndexLookup lookupChild = new Property2IndexLookup(indexed
                 .getChildNode("newchild").getChildNode("other"));
         assertEquals(ImmutableSet.of("testChild"),
                 lookupChild.find("foo", "xyz"));
@@ -115,14 +115,14 @@ public class IndexHookManagerTest {
         builder.child("oak:index")
                 .child("rootIndex")
                 .setProperty("propertyNames", "foo")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(REINDEX_PROPERTY_NAME, true)
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         NodeState after = builder.getNodeState();
 
         IndexHookManager im = new IndexHookManager(
-                new CompositeIndexHookProvider(new PropertyIndexHookProvider()));
+                new CompositeIndexHookProvider(new Property2IndexHookProvider()));
         NodeState indexed = im.processCommit(before, after);
 
         // first check that the index content nodes exist
@@ -133,7 +133,7 @@ public class IndexHookManagerTest {
         assertFalse(ps.getValue(Type.BOOLEAN).booleanValue());
 
         // next, lookup
-        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
+        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), lookup.find("foo", "abc"));
     }
 
@@ -157,13 +157,13 @@ public class IndexHookManagerTest {
         builder.child("oak:index")
                 .child("rootIndex")
                 .setProperty("propertyNames", "foo")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         NodeState after = builder.getNodeState();
 
         IndexHookManager im = new IndexHookManager(
-                new CompositeIndexHookProvider(new PropertyIndexHookProvider()));
+                new CompositeIndexHookProvider(new Property2IndexHookProvider()));
         NodeState indexed = im.processCommit(before, after);
 
         // first check that the index content nodes exist
@@ -174,7 +174,7 @@ public class IndexHookManagerTest {
         assertFalse(ps.getValue(Type.BOOLEAN).booleanValue());
 
         // next, lookup
-        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
+        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), lookup.find("foo", "abc"));
     }
 
@@ -196,7 +196,7 @@ public class IndexHookManagerTest {
         builder.child("oak:index")
                 .child("rootIndex")
                 .setProperty("propertyNames", "foo")
-                .setProperty("type", "property")
+                .setProperty("type", "p2")
                 .setProperty(JCR_PRIMARYTYPE, INDEX_DEFINITIONS_NODE_TYPE,
                         Type.NAME);
         NodeState before = builder.getNodeState();
@@ -205,7 +205,7 @@ public class IndexHookManagerTest {
         NodeState after = builder.getNodeState();
 
         IndexHookManager im = new IndexHookManager(
-                new CompositeIndexHookProvider(new PropertyIndexHookProvider()));
+                new CompositeIndexHookProvider(new Property2IndexHookProvider()));
         NodeState indexed = im.processCommit(before, after);
 
         // first check that the index content nodes exist
@@ -216,7 +216,7 @@ public class IndexHookManagerTest {
         assertFalse(ps.getValue(Type.BOOLEAN).booleanValue());
 
         // next, lookup
-        PropertyIndexLookup lookup = new PropertyIndexLookup(indexed);
+        Property2IndexLookup lookup = new Property2IndexLookup(indexed);
         assertEquals(ImmutableSet.of("testRoot"), lookup.find("foo", "abc"));
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/nodetype/NodeTypeIndexTest.java Fri Dec 14 09:24:08 2012
@@ -28,7 +28,7 @@ import org.apache.jackrabbit.oak.api.Blo
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.kernel.KernelNodeStore;
 import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 import org.apache.jackrabbit.oak.spi.query.Cursor;
@@ -54,7 +54,7 @@ public class NodeTypeIndexTest {
     public void setup() {
         MicroKernel mk = new MicroKernelImpl();
         store = new KernelNodeStore(mk);
-        store.setHook(IndexHookManager.of(new PropertyIndexHookProvider()));
+        store.setHook(IndexHookManager.of(new Property2IndexHookProvider()));
         // initialize node types & index definitions
         new InitialContent().initialize(store);
     }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexQueryTest.java Fri Dec 14 09:24:08 2012
@@ -16,23 +16,11 @@
  */
 package org.apache.jackrabbit.oak.plugins.index.p2;
 
-import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
-
-import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
-import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
-
-import com.google.common.collect.ImmutableList;
+import org.junit.Test;
 
 /**
  * Tests the query engine using the default index implementation: the
@@ -48,20 +36,9 @@ public class Property2IndexQueryTest ext
                 .createContentRepository();
     }
 
-    @Override
-    protected void createTestIndexNode() throws Exception {
-        Tree index = root.getTree("/");
-        Tree indexDef = index.addChild(INDEX_DEFINITIONS_NAME).addChild(
-                TEST_INDEX_NAME);
-        indexDef.setProperty(JcrConstants.JCR_PRIMARYTYPE,
-                INDEX_DEFINITIONS_NODE_TYPE, Type.NAME);
-        indexDef.setProperty(TYPE_PROPERTY_NAME, Property2Index.TYPE);
-        indexDef.setProperty(REINDEX_PROPERTY_NAME, true);
-        indexDef.setProperty(PropertyStates
-                .createProperty("propertyNames",
-                        ImmutableList.of(JCR_PRIMARYTYPE, JCR_MIXINTYPES),
-                        Type.STRINGS));
-        root.commit();
+    @Test
+    public void sql2Index() throws Exception {
+        test("sql2_index.txt");
     }
 
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexQueryTest.java Fri Dec 14 09:24:08 2012
@@ -16,8 +16,16 @@
  */
 package org.apache.jackrabbit.oak.plugins.index.property;
 
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
+
+import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.ContentRepository;
+import org.apache.jackrabbit.oak.api.Tree;
+import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.junit.Test;
@@ -26,6 +34,7 @@ import org.junit.Test;
  * Tests the query engine using the default index implementation: the
  * {@link PropertyIndexProvider}
  */
+@Deprecated
 public class PropertyIndexQueryTest extends AbstractQueryTest {
 
     @Override
@@ -36,7 +45,20 @@ public class PropertyIndexQueryTest exte
             .with(new PropertyIndexHookProvider())
             .createContentRepository();
     }
-    
+
+    @Override
+    protected void createTestIndexNode() throws Exception {
+        Tree index = root.getTree("/");
+        Tree indexDef = index.addChild(INDEX_DEFINITIONS_NAME).addChild(
+                TEST_INDEX_NAME);
+        indexDef.setProperty(JcrConstants.JCR_PRIMARYTYPE,
+                INDEX_DEFINITIONS_NODE_TYPE, Type.NAME);
+        indexDef.setProperty(TYPE_PROPERTY_NAME, PropertyIndex.TYPE);
+        indexDef.setProperty(REINDEX_PROPERTY_NAME, true);
+        indexDef.setProperty("propertyNames", "jcr:uuid");
+        root.commit();
+    }
+
     @Test
     public void sql2Index() throws Exception {
         test("sql2_index.txt");

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexTest.java Fri Dec 14 09:24:08 2012
@@ -28,6 +28,7 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
+@Deprecated
 public class PropertyIndexTest {
 
     private static final int MANY = 100;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserProviderTest.java Fri Dec 14 09:24:08 2012
@@ -24,7 +24,7 @@ import org.apache.jackrabbit.oak.Oak;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
 import org.apache.jackrabbit.oak.spi.security.ConfigurationParameters;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
@@ -57,7 +57,7 @@ public class UserProviderTest {
     public void setUp() throws Exception {
         root = new Oak()
                 .with(new InitialContent())
-                .with(new PropertyIndexHookProvider())
+                .with(new Property2IndexHookProvider())
                 .createRoot();
 
         defaultConfig = new ConfigurationParameters();

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java Fri Dec 14 09:24:08 2012
@@ -27,8 +27,8 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.nodetype.NodeTypeIndexProvider;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexProvider;
 import org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.DefaultTypeEditor;
@@ -72,10 +72,10 @@ public class Jcr {
         with(new RegistrationValidatorProvider());
         with(new ConflictValidatorProvider());
 
-        with(new PropertyIndexHookProvider());
+        with(new Property2IndexHookProvider());
         with(new AnnotatingConflictHandler());
 
-        with(new PropertyIndexProvider());
+        with(new Property2IndexProvider());
         with(new NodeTypeIndexProvider());
     }
 

Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java?rev=1421761&r1=1421760&r2=1421761&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java (original)
+++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java Fri Dec 14 09:24:08 2012
@@ -32,7 +32,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.plugins.index.CompositeIndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
 import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexHookProvider;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
+import org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceValidatorProvider;
 import org.apache.jackrabbit.oak.plugins.nodetype.DefaultTypeEditor;
@@ -207,7 +207,7 @@ public class Main {
                     new ValidatingHook(createDefaultValidatorProvider()),
                     IndexHookManager.of(
                             new CompositeIndexHookProvider(
-                            new PropertyIndexHookProvider(), 
+                            new Property2IndexHookProvider(), 
                             new LuceneIndexHookProvider())));
         }
 



Mime
View raw message