Use transparent addToCrawler in AutoSearch instead of addToIndex

This would likely also be of advantage for RSS import/schedule as
following bug-reports suggest
http://mantis.tokeek.de/view.php?id=569
http://mantis.tokeek.de/view.php?id=655
pull/56/head
reger 9 years ago
parent c7bd040870
commit bd8f7c11f5

@ -289,7 +289,7 @@ public class AutoSearch extends AbstractBusyThread {
urls.add(new DigestURL(entry, (byte[]) null));
this.gotresults++;
}
sb.addToIndex(urls, null, "AutoSearch", null, true);
sb.addToCrawler(urls, false);
ConcurrentLog.info(AutoSearch.class.getName(), "added " + urls.size() + " results from " + seed.getName() + " to index for query=" + currentQuery);
} catch (IOException ex) {
ConcurrentLog.info(AutoSearch.class.getName(), "no answer from " + seed.getName());

@ -3292,6 +3292,8 @@ public final class Switchboard extends serverSwitch {
/**
* load the content of a URL, parse the content and add the content to the index This process is started
* concurrently. The method returns immediately after the call.
* Loaded/indexed pages are added to the given SearchEvent. If this is not required prefer addToCrawler
* to spare concurrent processes, bandwidth and intransparent crawl/load activity
*
* @param url the url that shall be indexed
* @param searchEvent (optional) a search event that shall get results from the indexed pages directly
@ -3328,7 +3330,7 @@ public final class Switchboard extends serverSwitch {
continue;
}
requests.add(request);
}
}
new Thread() {
@Override

Loading…
Cancel
Save