add null pointer check to stopword fix

pull/1/head
reger 12 years ago
parent 7480e87386
commit d367b1f4d9

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

Loading…
Cancel
Save