mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
every time a crawl is started, the user expects a different search
result behaviour. This requires that the search cache is flushed for each crawl start. TODO: this should also be done if a crawl is terminated.
This commit is contained in:
parent
c737ff235d
commit
225200194a
|
@ -66,6 +66,7 @@ import net.yacy.search.Switchboard;
|
|||
import net.yacy.search.SwitchboardConstants;
|
||||
import net.yacy.search.index.Fulltext;
|
||||
import net.yacy.search.index.Segment;
|
||||
import net.yacy.search.query.SearchEventCache;
|
||||
import net.yacy.search.schema.CollectionSchema;
|
||||
import net.yacy.server.serverObjects;
|
||||
import net.yacy.server.serverSwitch;
|
||||
|
@ -76,8 +77,14 @@ public class Crawler_p {
|
|||
// this servlet starts a web crawl. The interface for entering the web crawl parameters is in IndexCreate_p.html
|
||||
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
|
||||
// return variable that accumulates replacements
|
||||
final Switchboard sb = (Switchboard) env;
|
||||
|
||||
// clean up all search events
|
||||
SearchEventCache.cleanupEvents(true);
|
||||
sb.index.clearCaches(); // every time the ranking is changed we need to remove old orderings
|
||||
|
||||
// inital values for AJAX Elements (without JavaScript)
|
||||
final serverObjects prop = new serverObjects();
|
||||
prop.put("rejected", 0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user