Skip to content

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

fix must match filter for full domain crawl

Lotusee89cf5ae58b
diff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.java
index 5b667dd6c..7e92a52c7 100644
--- a/source/de/anomic/crawler/CrawlProfile.java
+++ b/source/de/anomic/crawler/CrawlProfile.java
@@ -482,16 +482,16 @@ public class CrawlProfile extends ConcurrentHashMap<String, String> implements M
if (crawlingStartURL.isFile()) {
return "file://" + crawlingStartURL.getPath() + ".*";
} else if (crawlingStartURL.isSMB()) {
- return "smb://" + crawlingStartURL.getHost() + ".*";
+ return "smb://" + crawlingStartURL.getHost() + "(?:/|$)+.*";
} else if (crawlingStartURL.isFTP()) {
- return "ftp://" + crawlingStartURL.getHost() + ".*";
+ return "ftp://" + crawlingStartURL.getHost() + "(?:/|$)+.*";
} else {
final String host = crawlingStartURL.getHost();
if (host.startsWith("www.")) {
- return "https?://" + crawlingStartURL.getHost() + ".*";
+ return "https?://" + crawlingStartURL.getHost() + "(?:/|$)+.*";
} else {
// if the www is not given we accept that also
- return "https?://(www.)?" + crawlingStartURL.getHost() + ".*";
+ return "https?://(?:www.)?" + crawlingStartURL.getHost() + "(?:/|$)+.*";
}
}
}