add null pointer check to stopword fix

This commit is contained in:
reger 2013-06-07 00:13:45 +02:00
parent 7480e87386
commit d367b1f4d9

View File

@ -387,11 +387,13 @@ public final class SearchEvent {
// only with the query minus the stopwords which had not been used for the search
boolean filtered = false;
// check if query contains stopword
Iterator<byte[]> it = query.getQueryGoal().getIncludeHashes().iterator();
while (it.hasNext()) {
if (Switchboard.stopwordHashes.contains((it.next()))) {
filtered = true;
break;
if (Switchboard.stopwordHashes != null) {
Iterator<byte[]> it = query.getQueryGoal().getIncludeHashes().iterator();
while (it.hasNext()) {
if (Switchboard.stopwordHashes.contains((it.next()))) {
filtered = true;
break;
}
}
}
this.snippetFetchWordHashes = query.getQueryGoal().getIncludeHashes().clone();