Index: src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java	(revision 1528771)
+++ src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java	(working copy)
@@ -16,6 +16,7 @@
 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.write.InitialContent;
 import org.apache.jackrabbit.oak.query.AbstractQueryTest;
 import org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider;
@@ -68,4 +69,89 @@
                 "xpath",
                 ImmutableList.of("/content/testFullTextTermNameFile.txt"));
     }
+
+    @Test
+    public void testMultiNotEqual() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+
+        c.addChild("one").setProperty("prop", "value");
+        c.addChild("two").setProperty("prop",
+                ImmutableList.of("aaa", "value", "bbb"), Type.STRINGS);
+        c.addChild("three").setProperty("prop",
+                ImmutableList.of("aaa", "bbb", "ccc"), Type.STRINGS);
+        root.commit();
+
+        assertQuery("//*[@prop != 'val']", "xpath",
+                ImmutableList.of("two", "three"));
+    }
+
+    @Test
+    public void testMultiAndEquals() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+
+        c.addChild("one").setProperty("prop", "aaa");
+        c.addChild("two").setProperty("prop",
+                ImmutableList.of("aaa", "bbb", "ccc"), Type.STRINGS);
+        c.addChild("three").setProperty("prop", ImmutableList.of("aaa", "bbb"),
+                Type.STRINGS);
+        root.commit();
+
+        assertQuery("//*[(@prop = 'aaa' and @prop = 'bbb' and @prop = 'ccc')]",
+                "xpath", ImmutableList.of("two"));
+    }
+
+    @Test
+    public void testMultiAndLike() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+
+        c.addChild("one").setProperty("prop", "aaaBoom");
+        c.addChild("two").setProperty("prop",
+                ImmutableList.of("aaaBoom", "bbbBoom", "cccBoom"), Type.STRINGS);
+        c.addChild("three").setProperty("prop", ImmutableList.of("aaaBoom", "bbbBoom"),
+                Type.STRINGS);
+        root.commit();
+
+        assertQuery("//*[(jcr:like(@prop, 'aaa%') and jcr:like(@prop, 'bbb%') and jcr:like(@prop, 'ccc%'))]",
+                "xpath", ImmutableList.of("two"));
+    }
+
+    @Test
+    public void testSubPropertyMultiAndEquals() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+
+        c.addChild("one").addChild("child").setProperty("prop", "aaa");
+        c.addChild("two")
+                .addChild("child")
+                .setProperty("prop", ImmutableList.of("aaa", "bbb", "ccc"),
+                        Type.STRINGS);
+        c.addChild("three")
+                .addChild("child")
+                .setProperty("prop", ImmutableList.of("aaa", "bbb"),
+                        Type.STRINGS);
+        root.commit();
+
+        assertQuery(
+                "//*[(child/@prop = 'aaa' and child/@prop = 'bbb' and child/@prop = 'ccc')]",
+                "xpath", ImmutableList.of("two"));
+    }
+
+    @Test
+    public void testSubPropertyMultiAndLike() throws Exception {
+        Tree c = root.getTree("/").addChild("content");
+
+        c.addChild("one").addChild("child").setProperty("prop", "aaaBoom");
+        c.addChild("two")
+                .addChild("child")
+                .setProperty("prop", ImmutableList.of("aaaBoom", "bbbBoom", "cccBoom"),
+                        Type.STRINGS);
+        c.addChild("three")
+                .addChild("child")
+                .setProperty("prop", ImmutableList.of("aaaBoom", "bbbBoom"),
+                        Type.STRINGS);
+        root.commit();
+
+        assertQuery(
+                "//*[(jcr:like(child/@prop, 'aaa%') and jcr:like(child/@prop, 'bbb%') and jcr:like(child/@prop, 'ccc%'))]",
+                "xpath", ImmutableList.of("two"));
+    }
 }
