Permalink
Browse files

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

  • Loading branch information...
luccioman committed Jul 17, 2017
1 parent 44d455d commit 0ee8c030c4ab867dbe75215df0178bf7354d6122
Showing with 6 additions and 1 deletion.
  1. +6 −1 source/net/yacy/search/index/Fulltext.java
@@ -135,7 +135,12 @@ public void connectLocalSolr() throws IOException {
// 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});

0 comments on commit 0ee8c03

Please sign in to comment.