You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by al...@apache.org on 2012/08/01 16:39:45 UTC
svn commit: r1368026 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java
Author: alexparvulescu
Date: Wed Aug 1 14:39:45 2012
New Revision: 1368026
URL: http://svn.apache.org/viewvc?rev=1368026&view=rev
Log:
OAK-154 Full text search index - reverted the path concatenation change
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java?rev=1368026&r1=1368025&r2=1368026&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/lucene/LuceneEditor.java Wed Aug 1 14:39:45 2012
@@ -16,7 +16,6 @@
*/
package org.apache.jackrabbit.oak.plugins.lucene;
-import static org.apache.jackrabbit.oak.commons.PathUtils.concat;
import static org.apache.jackrabbit.oak.plugins.lucene.FieldFactory.newPathField;
import static org.apache.jackrabbit.oak.plugins.lucene.FieldFactory.newPropertyField;
import static org.apache.jackrabbit.oak.plugins.lucene.TermFactory.newPathTerm;
@@ -76,7 +75,7 @@ public class LuceneEditor implements Com
IndexWriter writer = new IndexWriter(directory, config);
try {
- LuceneDiff diff = new LuceneDiff(writer, "/");
+ LuceneDiff diff = new LuceneDiff(writer, "");
after.compareAgainstBaseState(before, diff);
diff.postProcess(after);
writer.commit();
@@ -139,7 +138,7 @@ public class LuceneEditor implements Com
}
if (exception == null) {
try {
- addSubtree(concat(path, name), after);
+ addSubtree(path + "/" + name, after);
} catch (IOException e) {
exception = e;
}
@@ -154,7 +153,7 @@ public class LuceneEditor implements Com
}
if (exception == null) {
try {
- LuceneDiff diff = new LuceneDiff(writer, concat(path, name));
+ LuceneDiff diff = new LuceneDiff(writer, path + "/" + name);
after.compareAgainstBaseState(before, diff);
diff.postProcess(after);
} catch (IOException e) {
@@ -170,7 +169,7 @@ public class LuceneEditor implements Com
}
if (exception == null) {
try {
- deleteSubtree(concat(path, name), before);
+ deleteSubtree(path + "/" + name, before);
} catch (IOException e) {
exception = e;
}
@@ -181,7 +180,7 @@ public class LuceneEditor implements Com
throws IOException {
writer.addDocument(makeDocument(path, state));
for (ChildNodeEntry entry : state.getChildNodeEntries()) {
- addSubtree(concat(path, entry.getName()), entry.getNodeState());
+ addSubtree(path + "/" + entry.getName(), entry.getNodeState());
}
}
@@ -189,7 +188,7 @@ public class LuceneEditor implements Com
throws IOException {
writer.deleteDocuments(newPathTerm(path));
for (ChildNodeEntry entry : state.getChildNodeEntries()) {
- deleteSubtree(concat(path, entry.getName()), entry.getNodeState());
+ deleteSubtree(path + "/" + entry.getName(), entry.getNodeState());
}
}