jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1527485 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.java test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexQueryTest.java
Date Mon, 30 Sep 2013 08:22:58 GMT
Author: alexparvulescu
Date: Mon Sep 30 08:22:58 2013
New Revision: 1527485

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

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.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/fulltext/FullTextTerm.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.java?rev=1527485&r1=1527484&r2=1527485&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/fulltext/FullTextTerm.java
Mon Sep 30 08:22:58 2013
@@ -67,7 +67,7 @@ public class FullTextTerm extends FullTe
                 } else if (c == '_') {
                     buff.append("\\_");
                     pattern = true;
-                } else if (Character.isLetterOrDigit(c) || " +-:&/".indexOf(c) >=
0) {
+                } else if (Character.isLetterOrDigit(c) || " +-:&/.".indexOf(c) >=
0) {
                     buff.append(c);
                 }
             }

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=1527485&r1=1527484&r2=1527485&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
Mon Sep 30 08:22:58 2013
@@ -58,8 +58,14 @@ public class TraversingIndexQueryTest ex
 
     @Test
     public void testFullTextTermName() throws Exception {
-        root.getTree("/").addChild("content").addChild("testFullTextTermName");
-        assertQuery("//*[jcr:contains(., 'testFullTextTermName')]", "xpath",
-                ImmutableList.of("/content/testFullTextTermName"));
+        Tree c = root.getTree("/").addChild("content");
+        c.addChild("testFullTextTermNameSimple");
+        c.addChild("testFullTextTermNameFile.txt");
+        assertQuery("//*[jcr:contains(., 'testFullTextTermNameSimple')]",
+                "xpath",
+                ImmutableList.of("/content/testFullTextTermNameSimple"));
+        assertQuery("//*[jcr:contains(., 'testFullTextTermNameFile.txt')]",
+                "xpath",
+                ImmutableList.of("/content/testFullTextTermNameFile.txt"));
     }
 }



Mime
View raw message