Skip to content

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

one more fix to badwords and stopwords

orbitere627f75415a7
diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java
index 566afae9f..362bf1f22 100644
--- a/source/de/anomic/search/Switchboard.java
+++ b/source/de/anomic/search/Switchboard.java
@@ -428,7 +428,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
listManager.reloadBlacklists();
// load badwords (to filter the topwords)
- if (badwords == null) {
+ if (badwords == null || badwords.size() == 0) {
final File badwordsFile = new File(rootPath, SwitchboardConstants.LIST_BADWORDS_DEFAULT);
badwords = SetTools.loadList(badwordsFile, NaturalOrder.naturalComparator);
badwordHashes = Word.words2hashes(badwords);
@@ -438,7 +438,7 @@ public final class Switchboard extends serverAbstractSwitch implements serverSwi
}
// load stopwords
- if (stopwords == null) {
+ if (stopwords == null || stopwords.size() == 0) {
final File stopwordsFile = new File(rootPath, SwitchboardConstants.LIST_STOPWORDS_DEFAULT);
stopwords = SetTools.loadList(stopwordsFile, NaturalOrder.naturalComparator);
stopwordHashes = Word.words2hashes(stopwords);