Commit 17f16537 authored by Maxim's avatar Maxim Committed by Matija Obreza
Browse files

Sort crop names in filter

parent 6ef59493
......@@ -32,6 +32,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.TreeMap;
import javax.imageio.ImageIO;
import javax.servlet.http.Cookie;
......@@ -456,7 +457,7 @@ public class ExplorerController extends BaseController implements InitializingBe
}
private Map<String, Map<String, Integer> > getCrops(AppliedFilters appliedFilters) throws SearchException {
Map<String, Map<String, Integer>> crops = new HashMap<>();
Map<String, Map<String, Integer>> crops = new TreeMap<>(String::compareTo);
appliedFilters.removeIf(appliedFilter -> appliedFilter.getKey().equals(FilterConstants.CROPS));
for (Term term : elasticService.termStatisticsAuto(appliedFilters, FilterConstants.CROPS, 30).getTerms()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment