fix for bad paths in dictionary processing

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6285 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 3b9aaf9e9f
commit d656a94f55

@ -236,6 +236,10 @@ surrogates.in = DATA/SURROGATES/in
# a path to the surrogate output directory
surrogates.out = DATA/SURROGATES/out
# a path to the dictionaries directory
# this directory also contains subdirectories for input sources, the did-you-mean function and other
dictionaries = DATA/DICTIONARIES
# storage place for new releases
releases = DATA/RELEASE

@ -265,17 +265,6 @@ public final class SearchEvent {
return false;
}
private int countFinishedRemoteSearch() {
int count = 0;
// check only primary search threads
if ((this.primarySearchThreads != null) && (this.primarySearchThreads.length != 0)) {
for (int i = 0; i < this.primarySearchThreads.length; i++) {
if ((this.primarySearchThreads[i] == null) || (!(this.primarySearchThreads[i].isAlive()))) count++;
}
}
return count;
}
public yacySearch[] getPrimarySearchThreads() {
return primarySearchThreads;
}

@ -220,6 +220,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
// storage management
public File htCachePath;
public File dictionariesPath;
public File listsPath;
public File htDocsPath;
public File rankingPath;
@ -303,8 +304,8 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
RemoteProxyConfig.init(this);
// load values from configs
final File indexPrimaryPath = getConfigPath(SwitchboardConstants.INDEX_PRIMARY_PATH, SwitchboardConstants.INDEX_PATH_DEFAULT);
this.log.logConfig("Index Primary Path: " + indexPrimaryPath.toString());
final File indexPath = getConfigPath(SwitchboardConstants.INDEX_PRIMARY_PATH, SwitchboardConstants.INDEX_PATH_DEFAULT);
this.log.logConfig("Index Primary Path: " + indexPath.toString());
this.listsPath = getConfigPath(SwitchboardConstants.LISTS_PATH, SwitchboardConstants.LISTS_PATH_DEFAULT);
this.log.logConfig("Lists Path: " + this.listsPath.toString());
this.htDocsPath = getConfigPath(SwitchboardConstants.HTDOCS_PATH, SwitchboardConstants.HTDOCS_PATH_DEFAULT);
@ -314,10 +315,12 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
this.rankingPermissions = new HashMap<String, String>(); // mapping of permission - to filename.
this.workPath = getConfigPath(SwitchboardConstants.WORK_PATH, SwitchboardConstants.WORK_PATH_DEFAULT);
this.log.logConfig("Work Path: " + this.workPath.toString());
this.dictionariesPath = getConfigPath(SwitchboardConstants.DICTIONARY_SOURCE_PATH, SwitchboardConstants.DICTIONARY_SOURCE_PATH_DEFAULT);
this.log.logConfig("Dictionaries Path:" + this.dictionariesPath.toString());
// init libraries
this.log.logConfig("initializing libraries");
LibraryProvider.initialize(rootPath, new File(rootPath, "dictionaries"));
LibraryProvider.initialize(rootPath, this.dictionariesPath);
// set a high maximum cache size to current size; this is adopted later automatically
final int wordCacheMaxCount = (int) getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 20000);
@ -337,8 +340,8 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
final long fileSizeMax = (serverSystem.isWindows) ? sb.getConfigLong("filesize.max.win", (long) Integer.MAX_VALUE) : sb.getConfigLong("filesize.max.other", (long) Integer.MAX_VALUE);
final int redundancy = (int) sb.getConfigLong("network.unit.dhtredundancy.senior", 1);
final int partitionExponent = (int) sb.getConfigLong("network.unit.dht.partitionExponent", 0);
this.networkRoot = new File(new File(indexPrimaryPath, networkName), "NETWORK");
this.queuesRoot = new File(new File(indexPrimaryPath, networkName), "QUEUES");
this.networkRoot = new File(new File(indexPath, networkName), "NETWORK");
this.queuesRoot = new File(new File(indexPath, networkName), "QUEUES");
this.networkRoot.mkdirs();
this.queuesRoot.mkdirs();
try {
@ -353,7 +356,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
partitionExponent);
indexSegment = new Segment(
log,
new File(new File(indexPrimaryPath, networkName), "TEXT"),
new File(new File(indexPath, networkName), "TEXT"),
wordCacheMaxCount,
fileSizeMax);
crawler = new CrawlSwitchboard(

@ -332,6 +332,9 @@ public final class SwitchboardConstants {
public static final String SURROGATES_OUT_PATH = "surrogates.out";
public static final String SURROGATES_OUT_PATH_DEFAULT = "DATA/SURROGATES/out";
public static final String DICTIONARY_SOURCE_PATH = "dictionaries";
public static final String DICTIONARY_SOURCE_PATH_DEFAULT = "DATA/DICTIONARIES";
/**
* <p><code>public static final String <strong>HTDOCS_PATH</strong> = "htDocsPath"</code></p>
* <p>Name of the setting specifying the folder beginning from the YaCy-installation's top-folder, where all

Loading…
Cancel
Save