jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1411606 - /jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java
Date Tue, 20 Nov 2012 10:10:42 GMT
Author: alexparvulescu
Date: Tue Nov 20 10:10:42 2012
New Revision: 1411606

URL: http://svn.apache.org/viewvc?rev=1411606&view=rev
Log:
OAK-154 Full text search index
 - updated the path term creation

Modified:
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java

Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java?rev=1411606&r1=1411605&r2=1411606&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/TermFactory.java
Tue Nov 20 10:10:42 2012
@@ -39,8 +39,8 @@ public final class TermFactory {
      * @return the path term.
      */
     public static Term newPathTerm(String path) {
-        if (!"/".equals(path) && path.startsWith("/")) {
-            path = path.substring(1);
+        if (!"/".equals(path) && !path.startsWith("/")) {
+            path = "/" + path;
         }
         return new Term(FieldNames.PATH, path);
     }



Mime
View raw message