Skip to content

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

fix for citation index generation in case that entry.referrerhash() is null. This is especially the case if ftp sites are crawled

Michael Peter Christena34e137e2794
diff --git a/source/net/yacy/crawler/CrawlStacker.java b/source/net/yacy/crawler/CrawlStacker.java
index daa5a71de..5550c3f38 100644
--- a/source/net/yacy/crawler/CrawlStacker.java
+++ b/source/net/yacy/crawler/CrawlStacker.java
@@ -138,7 +138,7 @@ public final class CrawlStacker {
// record the link graph for this request
byte[] anchorhash = entry.url().hash();
IndexCell<CitationReference> urlCitationIndex = this.indexSegment.urlCitation();
- if (urlCitationIndex != null) try {
+ if (urlCitationIndex != null && entry.referrerhash() != null) try {
urlCitationIndex.add(anchorhash, new CitationReference(entry.referrerhash(), entry.appdate().getTime()));
} catch (final Exception e) {
Log.logException(e);