Merge branch 'master' of git@gitorious.org:yacy/rc1.git

pull/1/head
Michael Peter Christen 10 years ago
commit 041b605cfe

@ -502,7 +502,7 @@ public final class Protocol {
// duetime : maximum time that a peer should spent to create a result
final long timestamp = System.currentTimeMillis();
event.addExpectedRemoteReferences(count);
event.addExpectedRemoteReferences(count);
SearchResult result = null;
for (String ip: target.getIPs()) {
//if (ip.indexOf(':') >= 0) System.out.println("Search target: IPv6: " + ip);
@ -531,7 +531,7 @@ public final class Protocol {
Network.log.info("SEARCH failed, Peer: " + target.hash + ":" + target.getName() + " (" + e.getMessage() + ")");
event.peers.peerActions.interfaceDeparture(target, ip);
return -1;
}
}
}
if (result == null) return -1;
@ -1016,6 +1016,7 @@ public final class Protocol {
for (Count ff: values) {
int c = (int) ff.getCount();
if (c == 0) continue;
if (ff.getName().length() == 0) continue; // facet entry without text is not useful
result.set(ff.getName(), c);
}
if (result.size() > 0) facets.put(field, result);

@ -633,9 +633,9 @@ public final class Switchboard extends serverSwitch {
// load badwords (to filter the topwords)
if ( badwords == null || badwords.isEmpty() ) {
File badwordsFile = new File(appPath, "/DATA/SETTINGS/" + SwitchboardConstants.LIST_BADWORDS_DEFAULT);
File badwordsFile = new File(appPath, "DATA/SETTINGS/" + SwitchboardConstants.LIST_BADWORDS_DEFAULT);
if (!badwordsFile.exists()) {
badwordsFile = new File(appPath, SwitchboardConstants.LIST_BADWORDS_DEFAULT);
badwordsFile = new File(appPath, "defaults/" + SwitchboardConstants.LIST_BADWORDS_DEFAULT);
}
badwords = SetTools.loadList(badwordsFile, NaturalOrder.naturalComparator);
// badwordHashes = Word.words2hashesHandles(badwords);
@ -649,7 +649,7 @@ public final class Switchboard extends serverSwitch {
// load stopwords (to filter query and topwords)
if ( stopwords == null || stopwords.isEmpty() ) {
File stopwordsFile = new File(dataPath, "/DATA/SETTINGS/" + SwitchboardConstants.LIST_STOPWORDS_DEFAULT);
File stopwordsFile = new File(dataPath, "DATA/SETTINGS/" + SwitchboardConstants.LIST_STOPWORDS_DEFAULT);
if (!stopwordsFile.exists()) {
stopwordsFile = new File(appPath, "defaults/"+SwitchboardConstants.LIST_STOPWORDS_DEFAULT);
}

Loading…
Cancel
Save