diff --git a/app/controllers/HomeController.java b/app/controllers/HomeController.java index a9b7341..6215f85 100644 --- a/app/controllers/HomeController.java +++ b/app/controllers/HomeController.java @@ -92,7 +92,8 @@ public HomeController(WSClient httpClient) { } public static final String[] AGGREGATIONS = new String[] { "type", "gndSubjectCategory.id", "geographicAreaCode.id", - "professionOrOccupation.id", "professionOrOccupation.label", "placeOfActivity.label", "dateOfBirth" }; + "professionOrOccupation.id", "professionOrOccupation.label.keyword", "placeOfActivity.label.keyword", + "dateOfBirth" }; @Inject Environment env; diff --git a/app/views/search.scala.html b/app/views/search.scala.html index 8b8baea..3ac777d 100644 --- a/app/views/search.scala.html +++ b/app/views/search.scala.html @@ -112,7 +112,7 @@ @facet(key: String) = { @defining((Json.parse(result) \ "aggregation" \ key).asOpt[Seq[JsValue]].getOrElse(Seq())) { buckets => @if(!buckets.isEmpty) { - @defining(key.replace(".id", "").replace(".label", "")) { simpleKey => + @defining(key.replace(".id", "").replace(".label.keyword", "")) { simpleKey =>