From 9150bc0f7de735549fb2988596fa710656388ec8 Mon Sep 17 00:00:00 2001 From: apfelmaennchen Date: Sat, 13 Jun 2009 07:02:50 +0000 Subject: [PATCH] - don't show empty "did you mean" git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6061 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacysearch.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index a4c95aa30..b8a7800d6 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -471,8 +471,9 @@ public class yacysearch { // check suggestions int meanMax = 0; if (post != null && post.containsKey("meanCount")) { - meanMax = Integer.parseInt(post.get("meanCount")); + meanMax = Integer.parseInt(post.get("meanCount")); } + prop.put("meanCount", meanMax); if(meanMax > 0) { DidYouMean didYouMean = new DidYouMean(sb); Iterator meanIt = didYouMean.getSuggestion(querystring).iterator(); @@ -499,7 +500,7 @@ public class yacysearch { meanCount++; } prop.put("didYouMean_suggestions_"+(meanCount-1)+"_sep",""); - prop.put("didYouMean", 1); + prop.put("didYouMean", meanCount>0 ? 1:0); prop.put("didYouMean_suggestions", meanCount); } else { prop.put("didYouMean", 0);