mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
add null pointer check to stopword fix
This commit is contained in:
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
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user