switch off real-time search if index is large

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7873 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2011-08-12 14:42:20 +00:00
parent 07f5954570
commit feac494f26
2 changed files with 5 additions and 1 deletions

View File

@ -56,7 +56,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
#%env/templates/simpleheader.template%#
#(/topmenu)#
<div>
<form class="search small" id="searchform" action="yacyinteractive.html" method="get" onkeyup="xmlhttpPost(); return false;">
<form class="search small" id="searchform" action="yacyinteractive.html" method="get" #(allowrealtime)#::onkeyup="xmlhttpPost(); return false;"::#(/allowrealtime)#>
<h2>#[promoteSearchPageGreeting]#</h2>
<div class="yacylogo">
<a href="#[promoteSearchPageGreeting.homepage]#" class="yacylogo"><img src="#[promoteSearchPageGreeting.smallImage]#" alt="yacysearch"/></a>
@ -65,6 +65,9 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
<input type="hidden" name="maximumRecords" value="#[maximumRecords]#" />
<input type="hidden" name="startRecord" value="#[startRecord]#" />
<input id="search" name="query" type="text" value="#[query]#" size="50" maxlength="80" />
#(allowrealtime)#
<input id="Enter" type="submit" name="Enter" value="Search" />::
#(/allowrealtime)#
</fieldset>
<!--<pre>Raw JSON String: <div id="raw"></div></pre>-->
</form>

View File

@ -54,6 +54,7 @@ public class yacyinteractive {
prop.putHTML("maximumRecords", maximumRecords);
prop.putHTML("querys", query.replaceAll(" ", "+"));
prop.put("serverlist", query.length() == 0 ? 1 : 0);
prop.put("allowrealtime", sb.indexSegments.URLCount() < 100000 ? 1 : 0);
return prop;
}
}