jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1408729 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/nodetype/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/ oak-core/src/main/java/org/apache/jackrabbit/oak/query/ o...
Date Tue, 13 Nov 2012 14:05:35 GMT
Author: thomasm
Date: Tue Nov 13 14:05:32 2012
New Revision: 1408729

URL: http://svn.apache.org/viewvc?rev=1408729&view=rev
Log:
OAK-425 Query Index: pass the query statement to the index for logging purposes

Modified:
    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/property/PropertyIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Cursors.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.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/query/index/FilterTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java
    jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java

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=1408729&r1=1408728&r2=1408729&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
Tue Nov 13 14:05:32 2012
@@ -28,7 +28,6 @@ import org.apache.jackrabbit.JcrConstant
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.core.ReadOnlyTree;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexLookup;
 import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
 import org.apache.jackrabbit.oak.spi.query.Cursor;
@@ -68,7 +67,7 @@ class NodeTypeIndex implements QueryInde
     public Cursor query(Filter filter, NodeState root) {
         NodeTypeIndexLookup lookup = new NodeTypeIndexLookup(root);
         if (!hasNodeTypeRestriction(filter) || !lookup.isIndexed(filter.getPath())) {
-            return Cursors.newTraversingCursor("?", filter, root);
+            return Cursors.newTraversingCursor(filter, root);
         }
         return Cursors.newPathCursor(lookup.find(
                 resolveNodeType(root, filter.getNodeType())));
@@ -97,7 +96,7 @@ class NodeTypeIndex implements QueryInde
         Set<String> ntNames = Sets.newHashSet();
         try {
             NodeType nt = ntMgr.getNodeType(nodeType);
-            for (NodeTypeIterator types = nt.getSubtypes(); types.hasNext(); ) {
+            for (NodeTypeIterator types = nt.getSubtypes(); types.hasNext();) {
                 ntNames.add(types.nextNodeType().getName());
             }
             ntNames.add(nodeType);

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=1408729&r1=1408728&r2=1408729&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
Tue Nov 13 14:05:32 2012
@@ -142,7 +142,7 @@ public class PropertyIndex implements Qu
         if (paths != null) {
             return Cursors.newPathCursor(paths);
         } else {
-            return Cursors.newTraversingCursor("?", filter, root);
+            return Cursors.newTraversingCursor(filter, root);
         }
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryEngineImpl.java
Tue Nov 13 14:05:32 2012
@@ -136,7 +136,7 @@ public class QueryEngineImpl {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("no indexes found - using TraversingIndex; indexProvider: " + indexProvider);
             }
-            best = new TraversingIndex(query.getStatement());
+            best = new TraversingIndex();
         }
         return best;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
Tue Nov 13 14:05:32 2012
@@ -121,7 +121,7 @@ public class SelectorImpl extends Source
     }
 
     private Filter createFilter() {
-        FilterImpl f = new FilterImpl(this);
+        FilterImpl f = new FilterImpl(this, query.getStatement());
         f.setNodeType(nodeTypeName);
         if (joinCondition != null) {
             joinCondition.restrict(f);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/FilterImpl.java
Tue Nov 13 14:05:32 2012
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map.Entry;
 
 import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
 import javax.jcr.PropertyType;
 
 import org.apache.jackrabbit.oak.api.PropertyValue;
@@ -42,6 +43,8 @@ public class FilterImpl implements Filte
      * The selector this filter applies to.
      */
     private final SelectorImpl selector;
+    
+    private final String queryStatement;
 
     /**
      * Whether the filter is always false.
@@ -75,8 +78,9 @@ public class FilterImpl implements Filte
 
     // TODO support "order by"
 
-    public FilterImpl(SelectorImpl selector) {
+    public FilterImpl(SelectorImpl selector, String queryStatement) {
         this.selector = selector;
+        this.queryStatement = queryStatement;
     }
 
     /**
@@ -254,6 +258,9 @@ public class FilterImpl implements Filte
     @Override
     public String toString() {
         StringBuilder buff = new StringBuilder();
+        if (queryStatement != null) {
+            buff.append("query ").append(queryStatement).append('\n');
+        }
         if (alwaysFalse) {
             return "(always false)";
         }
@@ -377,4 +384,10 @@ public class FilterImpl implements Filte
         fulltextConditions.add(condition);
     }
 
+    @Override
+    @Nullable
+    public String getQueryStatement() {
+        return queryStatement;
+    }
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java
Tue Nov 13 14:05:32 2012
@@ -29,16 +29,10 @@ import org.apache.jackrabbit.oak.spi.sta
  * An index that traverses over a given subtree.
  */
 public class TraversingIndex implements QueryIndex {
-    
-    private final String statement;
-    
-    public TraversingIndex(String statement) {
-        this.statement = statement;
-    }
 
     @Override
     public Cursor query(Filter filter, NodeState root) {
-        return Cursors.newTraversingCursor(statement, filter, root);
+        return Cursors.newTraversingCursor(filter, root);
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Cursors.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Cursors.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Cursors.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Cursors.java
Tue Nov 13 14:05:32 2012
@@ -57,16 +57,13 @@ public class Cursors {
      * Returns a traversing cursor based on the path restriction in the given
      * {@link Filter}.
      *
-     * @param statement the query statement. This string is only used for
-     *                  logging purposes.
      * @param filter    the filter.
      * @param root      the root {@link NodeState}.
      * @return the {@link Cursor}.
      */
-    public static Cursor newTraversingCursor(String statement,
-                                             Filter filter,
+    public static Cursor newTraversingCursor(Filter filter,
                                              NodeState root) {
-        return new TraversingCursor(statement, filter, root);
+        return new TraversingCursor(filter, root);
     }
 
     /**
@@ -108,8 +105,6 @@ public class Cursors {
 
         private static final Logger LOG = LoggerFactory.getLogger(TraversingIndex.class);
 
-        private final String statement;
-
         private final Filter filter;
 
         private final Deque<Iterator<? extends ChildNodeEntry>> nodeIterators
=
@@ -123,8 +118,7 @@ public class Cursors {
 
         private boolean closed;
 
-        public TraversingCursor(String statement, Filter filter, NodeState root) {
-            this.statement = statement;
+        public TraversingCursor(Filter filter, NodeState root) {
             this.filter = filter;
 
             String path = filter.getPath();
@@ -187,7 +181,7 @@ public class Cursors {
 
                     readCount++;
                     if (readCount % 100 == 0) {
-                        LOG.warn("Traversed " + readCount + " nodes with filter " + filter
+ " for query " + statement + "; consider creating an index or changing the query");
+                        LOG.warn("Traversed " + readCount + " nodes with filter " + filter
+ "; consider creating an index or changing the query");
                     }
 
                     NodeState node = entry.getNodeState();

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/Filter.java
Tue Nov 13 14:05:32 2012
@@ -21,6 +21,7 @@ package org.apache.jackrabbit.oak.spi.qu
 import java.util.Collection;
 
 import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
 import javax.jcr.PropertyType;
 
 import org.apache.jackrabbit.oak.api.PropertyValue;
@@ -67,10 +68,21 @@ public interface Filter {
     String getPath();
 
     /**
+     * Get the node type.
+     * 
      * @return the node type restriction or <code>null</code> if none is set.
      */
     @CheckForNull
     String getNodeType();
+    
+    /**
+     * Get the complete query statement. The statement should only be used for
+     * logging purposes.
+     * 
+     * @return the query statement (possibly null)
+     */
+    @Nullable
+    String getQueryStatement();
 
     /**
      * A restriction for a property.

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=1408729&r1=1408728&r2=1408729&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
Tue Nov 13 14:05:32 2012
@@ -75,7 +75,7 @@ public class NodeTypeIndexTest {
 
         NodeState rootState = store.getRoot();
         NodeTypeIndex index = new NodeTypeIndex();
-        FilterImpl filter = new FilterImpl(null);
+        FilterImpl filter = new FilterImpl(null, null);
 
         filter.setNodeType(JcrConstants.NT_FOLDER);
         // note on cost: this is currently twice the number of matches

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/FilterTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/FilterTest.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/FilterTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/FilterTest.java
Tue Nov 13 14:05:32 2012
@@ -42,7 +42,7 @@ public class FilterTest {
         PropertyValue one = PropertyValues.newString("1");
         PropertyValue two = PropertyValues.newString("2");
 
-        FilterImpl f = new FilterImpl(null);
+        FilterImpl f = new FilterImpl(null, null);
         assertTrue(null == f.getPropertyRestriction("x"));
         f.restrictProperty("x", Operator.LESS_OR_EQUAL, two);
         assertEquals("..2]", f.getPropertyRestriction("x").toString());
@@ -55,7 +55,7 @@ public class FilterTest {
         f.restrictProperty("x", Operator.EQUAL, two);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictProperty("x", Operator.EQUAL, one);
         assertEquals("[1..1]", f.getPropertyRestriction("x").toString());
         f.restrictProperty("x", Operator.EQUAL, one);
@@ -67,13 +67,13 @@ public class FilterTest {
         f.restrictProperty("x", Operator.GREATER_THAN, one);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictProperty("x", Operator.EQUAL, one);
         assertEquals("[1..1]", f.getPropertyRestriction("x").toString());
         f.restrictProperty("x", Operator.LESS_THAN, one);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictProperty("x", Operator.NOT_EQUAL, null);
         assertEquals("..", f.getPropertyRestriction("x").toString());
         f.restrictProperty("x", Operator.LESS_THAN, one);
@@ -108,11 +108,11 @@ public class FilterTest {
                     .nextInt(Filter.PathRestriction.values().length)];
             Filter.PathRestriction r2 = Filter.PathRestriction.values()[r
                     .nextInt(Filter.PathRestriction.values().length)];
-            FilterImpl f1 = new FilterImpl(null);
+            FilterImpl f1 = new FilterImpl(null, null);
             f1.restrictPath(p1, r1);
-            FilterImpl f2 = new FilterImpl(null);
+            FilterImpl f2 = new FilterImpl(null, null);
             f2.restrictPath(p2, r2);
-            FilterImpl fc = new FilterImpl(null);
+            FilterImpl fc = new FilterImpl(null, null);
             fc.restrictPath(p1, r1);
             fc.restrictPath(p2, r2);
             int tooMany = 0;
@@ -122,7 +122,7 @@ public class FilterTest {
                 if (expected == got) {
                     // good
                 } else if (expected && !got) {
-                    fc = new FilterImpl(null);
+                    fc = new FilterImpl(null, null);
                     fc.restrictPath(p1, r1);
                     fc.restrictPath(p2, r2);
                     fail("not matched: " + p1 + "/" + r1.name() + " && " + p2
@@ -141,7 +141,7 @@ public class FilterTest {
 
     @Test
     public void pathRestrictions() throws Exception {
-        FilterImpl f = new FilterImpl(null);
+        FilterImpl f = new FilterImpl(null, null);
         assertEquals("/", f.getPath());
         assertEquals(Filter.PathRestriction.ALL_CHILDREN,
                 f.getPathRestriction());
@@ -150,7 +150,7 @@ public class FilterTest {
         f.restrictPath("/test2", Filter.PathRestriction.ALL_CHILDREN);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.ALL_CHILDREN);
         assertEquals("/test", f.getPath());
         assertEquals(Filter.PathRestriction.ALL_CHILDREN,
@@ -163,7 +163,7 @@ public class FilterTest {
         assertEquals("/test/x/y", f.getPath());
         assertEquals(Filter.PathRestriction.PARENT, f.getPathRestriction());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.DIRECT_CHILDREN);
         f.restrictPath("/test/x/y", Filter.PathRestriction.PARENT);
         assertEquals("/test/x/y", f.getPath());
@@ -171,7 +171,7 @@ public class FilterTest {
         f.restrictPath("/test/y", Filter.PathRestriction.DIRECT_CHILDREN);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test/x/y", Filter.PathRestriction.PARENT);
         f.restrictPath("/test/x", Filter.PathRestriction.EXACT);
         assertEquals("/test/x", f.getPath());
@@ -179,12 +179,12 @@ public class FilterTest {
         f.restrictPath("/test/y", Filter.PathRestriction.EXACT);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.ALL_CHILDREN);
         f.restrictPath("/test", Filter.PathRestriction.PARENT);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test/x", Filter.PathRestriction.PARENT);
         f.restrictPath("/test", Filter.PathRestriction.ALL_CHILDREN);
         assertEquals("/test/x", f.getPath());
@@ -192,23 +192,23 @@ public class FilterTest {
         f.restrictPath("/test/x", Filter.PathRestriction.ALL_CHILDREN);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.ALL_CHILDREN);
         f.restrictPath("/test", Filter.PathRestriction.EXACT);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.DIRECT_CHILDREN);
         f.restrictPath("/test/x", Filter.PathRestriction.EXACT);
         assertEquals("/test/x", f.getPath());
         assertEquals(Filter.PathRestriction.EXACT, f.getPathRestriction());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.DIRECT_CHILDREN);
         f.restrictPath("/test/x/y", Filter.PathRestriction.EXACT);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test/x", Filter.PathRestriction.PARENT);
         f.restrictPath("/", Filter.PathRestriction.ALL_CHILDREN);
         assertEquals("/test/x", f.getPath());
@@ -216,7 +216,7 @@ public class FilterTest {
         f.restrictPath("/test/y", Filter.PathRestriction.EXACT);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test", Filter.PathRestriction.DIRECT_CHILDREN);
         assertEquals("/test", f.getPath());
         assertEquals(Filter.PathRestriction.DIRECT_CHILDREN,
@@ -235,7 +235,7 @@ public class FilterTest {
         f.restrictPath("/test2", Filter.PathRestriction.ALL_CHILDREN);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test/x", Filter.PathRestriction.EXACT);
         assertEquals("/test/x", f.getPath());
         assertEquals(Filter.PathRestriction.EXACT, f.getPathRestriction());
@@ -245,7 +245,7 @@ public class FilterTest {
         f.restrictPath("/test/y", Filter.PathRestriction.DIRECT_CHILDREN);
         assertTrue(f.isAlwaysFalse());
 
-        f = new FilterImpl(null);
+        f = new FilterImpl(null, null);
         f.restrictPath("/test/x/y", Filter.PathRestriction.PARENT);
         assertEquals("/test/x/y", f.getPath());
         assertEquals(Filter.PathRestriction.PARENT, f.getPathRestriction());

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java
Tue Nov 13 14:05:32 2012
@@ -64,12 +64,12 @@ public class TraversingIndexTest {
 
     @Test
     public void traverse() throws Exception {
-        TraversingIndex t = new TraversingIndex("?");
+        TraversingIndex t = new TraversingIndex();
 
         String head = mk.getHeadRevision();
         head = mk.commit("/", "+ \"parents\": { \"p0\": {\"id\": \"0\"}, \"p1\": {\"id\":
\"1\"}, \"p2\": {\"id\": \"2\"}}", head, "");
         head = mk.commit("/", "+ \"children\": { \"c1\": {\"p\": \"1\"}, \"c2\": {\"p\":
\"1\"}, \"c3\": {\"p\": \"2\"}, \"c4\": {\"p\": \"3\"}}", head, "");
-        FilterImpl f = new FilterImpl(null);
+        FilterImpl f = new FilterImpl(null, null);
 
         f.setPath("/");
         List<String> paths = new ArrayList<String>();

Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java?rev=1408729&r1=1408728&r2=1408729&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
Tue Nov 13 14:05:32 2012
@@ -58,7 +58,7 @@ public class LuceneIndexTest implements 
         IndexDefinition testDef = new IndexDefinitionImpl("lucene",
                 TYPE_LUCENE, "/oak:index/lucene");
         QueryIndex queryIndex = new LuceneIndex(testDef);
-        FilterImpl filter = new FilterImpl(null);
+        FilterImpl filter = new FilterImpl(null, null);
         filter.restrictPath("/", Filter.PathRestriction.EXACT);
         filter.restrictProperty("foo", Operator.EQUAL,
                 PropertyValues.newString("bar"));



Mime
View raw message