try to avoid the unresolved pattern in search result

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7940 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 2e8c8ebf54
commit b0b4886618

@ -72,7 +72,8 @@ function addHover() {
function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSize, remoteResourceSize, remoteIndexCount, remotePeerCount, navurlbase) {
if (offset >= 0) document.getElementById("resultsOffset").firstChild.nodeValue = offset;
if (itemscount >= 0) document.getElementById("itemscount").firstChild.nodeValue = itemscount;
if (itemscount == 0) return;
document.getElementById("itemscount").firstChild.nodeValue = itemscount;
document.getElementById("totalcount").firstChild.nodeValue = totalcount;
if (document.getElementById("localResourceSize") == null) return;
document.getElementById("localResourceSize").firstChild.nodeValue = localResourceSize;

@ -17,7 +17,17 @@ public class yacysearchlatestinfo {
final String eventID = post.get("eventID", "");
final SearchEvent theSearch = SearchEventCache.getEvent(eventID);
if (theSearch == null) {
// the event does not exist, show empty page
// the event does not exist.
// to avoid missing patterns, we return dummy values
prop.put("offset", 0);
prop.put("itemscount", -1);
prop.put("itemsperpage", 10);
prop.put("totalcount", 0);
prop.put("localResourceSize", 0);
prop.put("localMissCount", 0);
prop.put("remoteResourceSize", 0);
prop.put("remoteIndexCount", 0);
prop.put("remotePeerCount", 0);
return prop;
}
final QueryParams theQuery = theSearch.getQuery();

Loading…
Cancel
Save