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 =>
@models.GndOntology.label(simpleKey) @if(buckets.size>7){ @@ -230,9 +230,9 @@
@models.GndOntology.label("type")
@if(!buckets.isEmpty) {

Ergebnisse eingrenzen:

@*@typeFacet(buckets)*@ - @facet("professionOrOccupation.label") + @facet("professionOrOccupation.label.keyword") @facet("gndSubjectCategory.id") - @facet("placeOfActivity.label") + @facet("placeOfActivity.label.keyword") @facet("geographicAreaCode.id") @*@facet("professionOrOccupation.id")*@ @*@facet("dateOfBirth")*@ diff --git a/conf/index-settings.json b/conf/index-settings.json index cc68d70..b70b323 100644 --- a/conf/index-settings.json +++ b/conf/index-settings.json @@ -145,14 +145,24 @@ "professionOrOccupation": { "properties" : { "label": { - "type": "keyword" + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } } } }, "placeOfActivity": { "properties" : { "label": { - "type": "keyword" + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } } } }