mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
try to guess default crawling mode, if none set
This commit is contained in:
parent
b4f0c822f2
commit
45cf553bc3
|
@ -99,10 +99,22 @@ public class CrawlStartExpert_p {
|
|||
// sitemap needs "crawlingFile" parameter, checked already
|
||||
prop.put("crawlingMode_file", "1");
|
||||
hasMode = true;
|
||||
}
|
||||
// default to URL mode
|
||||
if (!hasMode) {
|
||||
} else if (crawlingMode.equalsIgnoreCase("url")
|
||||
&& prop.getBoolean("has_crawlingURL")) {
|
||||
prop.put("crawlingMode_url", "1");
|
||||
hasMode = true;
|
||||
}
|
||||
// try to guess mode
|
||||
if (!hasMode) {
|
||||
if (prop.getBoolean("has_crawlingURL")) {
|
||||
prop.put("crawlingMode_url", "1");
|
||||
} else if (prop.getBoolean("has_sitemapURL")) {
|
||||
prop.put("crawlingMode_sitemap", "1");
|
||||
} else if (prop.getBoolean("has_crawlingFile")) {
|
||||
prop.put("crawlingMode_file", "1");
|
||||
} else {
|
||||
prop.put("crawlingMode_url", "1");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// default to URL
|
||||
|
|
Loading…
Reference in New Issue
Block a user