jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1394538 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
Date Fri, 05 Oct 2012 14:11:02 GMT
Author: alexparvulescu
Date: Fri Oct  5 14:11:02 2012
New Revision: 1394538

URL: http://svn.apache.org/viewvc?rev=1394538&view=rev
Log:
OAK-367 Lucene index cannot handle child properties in queries

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java?rev=1394538&r1=1394537&r2=1394538&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
Fri Oct  5 14:11:02 2012
@@ -192,6 +192,10 @@ public class LuceneIndex implements Quer
 
         for (PropertyRestriction pr : filter.getPropertyRestrictions()) {
             String name = pr.propertyName;
+            if (name.contains("/")) {
+                // lucene cannot handle child-level property restrictions
+                continue;
+            }
             String first = null;
             String last = null;
             boolean isLike = pr.isLike;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java?rev=1394538&r1=1394537&r2=1394538&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
Fri Oct  5 14:11:02 2012
@@ -26,8 +26,6 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.commit.CompositeHook;
 import org.apache.jackrabbit.oak.spi.query.CompositeQueryIndexProvider;
 import org.apache.jackrabbit.oak.spi.query.QueryIndexProvider;
-import org.junit.Ignore;
-import org.junit.Test;
 
 /**
  * Tests the query engine using the default index implementation: the
@@ -55,10 +53,4 @@ public class LuceneIndexQueryTest extend
         return new Oak(mk).with(qip).with(ch).createContentRepository();
     }
 
-    @Test
-    @Ignore("OAK-367")
-    public void sql2() throws Exception {
-        test("sql2.txt");
-    }
-
 }
\ No newline at end of file



Mime
View raw message