Skip to content
Permalink
Browse files

Consistently render empty facets and facets having only entries at zero

  • Loading branch information...
luccioman committed Jul 17, 2018
1 parent 6831bdf commit 88e6ce23c9a114031db7c5c2b49af615e77f06ae
Showing with 6 additions and 1 deletion.
  1. +6 −1 htroot/yacysearchtrailer.java
@@ -351,7 +351,8 @@ public static serverObjects respond(final RequestHeader header, final serverObje
name = navigatorIterator.next();
count = navi.get(name);
if (count == 0) {
break;
/* This entry has a zero count, but the next may be positive */
continue;
}

rawNav = navi.getQueryModifier(name);
@@ -381,6 +382,10 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("navs_" + ni + "_element_" + i + "_nl", 1);
i++;
}
if(i == 0) {
/* The navigator has only entries with value==0 : this is equivalent to empty navigator */
continue;
}
prop.put("navs_" + ni + "_element", i);
prop.put("navs_" + ni + "_count", i);
i--;

0 comments on commit 88e6ce2

Please sign in to comment.
You can’t perform that action at this time.