jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1526221 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
Date Wed, 25 Sep 2013 16:28:08 GMT
Author: alexparvulescu
Date: Wed Sep 25 16:28:08 2013
New Revision: 1526221

URL: http://svn.apache.org/r1526221
Log:
OAK-1024 Full-text search on the traversing index fails if the condition contains a slash
 - added node name to the full-text checks


Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java?rev=1526221&r1=1526220&r2=1526221&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
Wed Sep 25 16:28:08 2013
@@ -184,6 +184,10 @@ public class FullTextSearchImpl extends 
             appendString(buff, p);
         } else {
             String path = selector.currentPath();
+            if (!PathUtils.denotesRoot(path)) {
+                appendString(buff,
+                        PropertyValues.newString(PathUtils.getName(path)));
+            }
             if (relativePath != null) {
                 path = PathUtils.concat(path, relativePath);
             }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java?rev=1526221&r1=1526220&r2=1526221&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
Wed Sep 25 16:28:08 2013
@@ -56,4 +56,10 @@ public class TraversingIndexQueryTest ex
                 ImmutableList.of("/content"));
     }
 
+    @Test
+    public void testFullTextTermName() throws Exception {
+        root.getTree("/").addChild("content").addChild("testFullTextTermName");
+        assertQuery("//*[jcr:contains(., 'testFullTextTermName')]", "xpath",
+                ImmutableList.of("/content/testFullTextTermName"));
+    }
 }



Mime
View raw message