From c454ef69c6f6379573849b6acdcde2a5416f5f26 Mon Sep 17 00:00:00 2001 From: reger Date: Tue, 3 Feb 2015 03:08:34 +0100 Subject: [PATCH] add shortMemory check to heuristic search and skip operation on shortMemory (no request to remote openserch systems) --- source/net/yacy/cora/federate/FederateSearchManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/cora/federate/FederateSearchManager.java b/source/net/yacy/cora/federate/FederateSearchManager.java index 32e763740..b43b1dd78 100644 --- a/source/net/yacy/cora/federate/FederateSearchManager.java +++ b/source/net/yacy/cora/federate/FederateSearchManager.java @@ -41,6 +41,7 @@ import net.yacy.cora.util.ConcurrentLog; import net.yacy.document.parser.xml.opensearchdescriptionReader; import net.yacy.kelondro.data.meta.URIMetadataNode; import net.yacy.kelondro.util.Bitfield; +import net.yacy.kelondro.util.MemoryControl; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; import net.yacy.search.query.QueryGoal; @@ -141,7 +142,7 @@ public class FederateSearchManager { */ public void search(SearchEvent theSearch) { if (theSearch != null) { - if (!theSearch.query.isLocal()) { + if (!theSearch.query.isLocal() && !MemoryControl.shortStatus()) { Set picklist = getBest(theSearch.getQuery()); for (AbstractFederateSearchConnector fsc : picklist) { fsc.search(theSearch); @@ -157,7 +158,7 @@ public class FederateSearchManager { * @return list of results according to YaCy schema */ public List query(QueryParams query) { - if (query.isLocal()) { + if (!query.isLocal() && !MemoryControl.shortStatus()) { List sdl = new ArrayList(); Set picklist = getBest(query); for (AbstractFederateSearchConnector fsc : picklist) {