Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Log an error when Solr folder migration fails for some reason.

luccioman0ee8c030c4ab
diff --git a/source/net/yacy/search/index/Fulltext.java b/source/net/yacy/search/index/Fulltext.java
index 1957f7a59..5f13eae98 100644
--- a/source/net/yacy/search/index/Fulltext.java
+++ b/source/net/yacy/search/index/Fulltext.java
@@ -135,7 +135,12 @@ public final class Fulltext {
// migrate old solr to new
for (String oldVersion: SOLR_OLD_PATH) {
File oldLocation = new File(this.segmentPath, oldVersion);
- if (oldLocation.exists()) oldLocation.renameTo(solrLocation);
+ if (oldLocation.exists()) {
+ if(!oldLocation.renameTo(solrLocation)) {
+ ConcurrentLog.severe("Fulltext", "Failed renaming old Solr location ("
+ + oldLocation.getAbsolutePath() + ") to new location : " + solrLocation.getAbsolutePath());
+ }
+ }
}
EmbeddedInstance localCollectionInstance = new EmbeddedInstance(new File(new File(Switchboard.getSwitchboard().appPath, "defaults"), "solr"), solrLocation, CollectionSchema.CORE_NAME, new String[]{CollectionSchema.CORE_NAME, WebgraphSchema.CORE_NAME});