add high scored items first to YearNavigator (to make sure to be included

in sorted view)
pull/93/head
reger 8 years ago
parent 0ba5a838f7
commit 59130777a6

@ -62,8 +62,11 @@ public class StringNavigator extends ConcurrentScoreMap<String> implements Navi
if (field != null) {
switch (field) {
case author_sxt:
String tmpkey = key.indexOf(' ') > 0 ? "(" + key + ")" : key; // may contain spaces
mod = "author:" + tmpkey;
if (key.indexOf(' ') > 0) { // may contain spaces
mod = "author:(" + key + ")";
} else {
mod = "author:" + key;
}
break;
case url_protocol_s:
mod = "/" + key;

@ -133,7 +133,11 @@ public class YearNavigator extends StringNavigator implements Navigator {
} else {
years = new TreeSet(Collections.reverseOrder());
}
Iterator<String> it = this.iterator();
// make sure keys with high score are included (display may be limited in size)
// Iterator<String> it = this.iterator();
Iterator<String> it = super.keys(false);
while (it.hasNext()) {
years.add(it.next());
}

Loading…
Cancel
Save