From 6f705869b65f3ac3a47b6561426f824fb6add298 Mon Sep 17 00:00:00 2001 From: Jens Wille Date: Fri, 24 Jan 2025 10:35:26 +0100 Subject: [PATCH 1/2] Make GND ID available for search. - contribution.agent.gndIdentifier - subject.componentList.gndIdentifier - subject.gndIdentifier --- src/main/resources/alma/index-config.json | 20 ++++++++++++++++++++ web/test/tests/IndexIntegrationTest.java | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/src/main/resources/alma/index-config.json b/src/main/resources/alma/index-config.json index 335e80db2..ba825999d 100644 --- a/src/main/resources/alma/index-config.json +++ b/src/main/resources/alma/index-config.json @@ -633,6 +633,12 @@ }, "id": { "type": "keyword" + }, + "gndIdentifier": { + "type": "keyword", + "copy_to": [ + "q.all" + ] } } }, @@ -726,6 +732,13 @@ "id": { "type": "keyword" }, + "gndIdentifier": { + "type": "keyword", + "copy_to": [ + "q.all", + "q.subject" + ] + }, "dateOfBirthAndDeath": { "type": "text" }, @@ -770,6 +783,13 @@ "id": { "type": "keyword" }, + "gndIdentifier": { + "type": "keyword", + "copy_to": [ + "q.all", + "q.subject" + ] + }, "label": { "type": "text", "analyzer": "german_analyzer", diff --git a/web/test/tests/IndexIntegrationTest.java b/web/test/tests/IndexIntegrationTest.java index dce6a2e33..06bed86c0 100644 --- a/web/test/tests/IndexIntegrationTest.java +++ b/web/test/tests/IndexIntegrationTest.java @@ -38,6 +38,7 @@ public static Collection data() { { "contribution.agent.label:Westfalen", /*->*/ 3 }, { "contribution.agent.label:Westfälen", /*->*/ 3 }, { "contribution.agent.id:\"https\\://d-nb.info/gnd/5253963-5\"", /*->*/ 1 }, + { "contribution.agent.gndIdentifier:5253963-5", /*->*/ 1 }, { "contribution.agent.id:5265186-1", /*->*/ 0 }, { "contribution.agent.id:\"5265186-1\"", /*->*/ 0 }, { "title:Westfalen AND contribution.agent.label:Prause", /*->*/ 1 }, @@ -50,6 +51,7 @@ public static Collection data() { { "subject.componentList.label:Düsseldorfer", /*->*/ 1 }, { "subject.componentList.label.unstemmed:Düsseldorfer", /*->*/ 0 }, { "subject.componentList.id:\"https\\://d-nb.info/gnd/4042570-8\"", /*->*/ 2 }, + { "subject.componentList.gndIdentifier:4042570-8", /*->*/ 2 }, { "(title:Westfalen OR title:Münsterland) AND NOT contribution.agent.id:\"https\\://d-nb.info/gnd/2019209-5\"", /*->*/ 8 }, { "subject.componentList.label:Westfalen", /*->*/ 11 }, { "subject.componentList.label:Westfälen", /*->*/ 11 }, @@ -58,6 +60,7 @@ public static Collection data() { { "subject.componentList.id:1113670827", /*->*/ 0 }, { "subject.componentList.type:PlaceOrGeographicName", /*->*/ 25 }, { "publication.location:Berlin", /*->*/ 16 }, + { "subject.gndIdentifier:4040795-0", /*->*/ 1 }, { "subject.notation:914.3", /*->*/ 7 }, { "subject.notation:914", /*->*/ 0 }, { "subject.notation:914*", /*->*/ 7 }, @@ -113,6 +116,8 @@ public static Collection data() { { "q.subject:Westfälen", /*->*/ 11 }, { "q.subject:Lithuania", /*->*/ 1 }, { "q.subject:Baukem", /*->*/ 1 }, + { "q.subject:4040795-0", /*->*/ 1 }, + { "q.subject:4042570-8", /*->*/ 2 }, { "q.title:der", /*->*/ 0 }, { "q.title:Westfalen", /*->*/ 8 }, { "q.title:Eilendorf", /*->*/ 1 }, @@ -120,6 +125,9 @@ public static Collection data() { { "q.all:Fédérale", /*->*/ 5 }, { "q.all:(Courtillon cinema)", /*->*/ 1 }, { "q.all:(Courtillon cinéma)", /*->*/ 1 }, + { "q.all:4040795-0", /*->*/ 1 }, + { "q.all:4042570-8", /*->*/ 2 }, + { "q.all:5253963-5", /*->*/ 1 }, { "q.all:0702075558", /*->*/ 1 }, { "q.all:07\\-0207\\-555\\-8", /*->*/ 1 }, // search with hyphens possible due to digibib_standardnumber { "q.all:07206763", /*->*/ 1 }, From 0b82c0610d2f0b3bbedd5e9d018d5673932ad4ff Mon Sep 17 00:00:00 2001 From: Jens Wille Date: Fri, 24 Jan 2025 10:38:13 +0100 Subject: [PATCH 2/2] Include agent and subject ID in DigiBib search fields. --- src/main/resources/alma/index-config.json | 17 ++++++++++++++--- web/test/tests/IndexIntegrationTest.java | 5 +++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/resources/alma/index-config.json b/src/main/resources/alma/index-config.json index ba825999d..53725ff70 100644 --- a/src/main/resources/alma/index-config.json +++ b/src/main/resources/alma/index-config.json @@ -632,7 +632,10 @@ ] }, "id": { - "type": "keyword" + "type": "keyword", + "copy_to": [ + "q.all" + ] }, "gndIdentifier": { "type": "keyword", @@ -730,7 +733,11 @@ ] }, "id": { - "type": "keyword" + "type": "keyword", + "copy_to": [ + "q.all", + "q.subject" + ] }, "gndIdentifier": { "type": "keyword", @@ -781,7 +788,11 @@ } }, "id": { - "type": "keyword" + "type": "keyword", + "copy_to": [ + "q.all", + "q.subject" + ] }, "gndIdentifier": { "type": "keyword", diff --git a/web/test/tests/IndexIntegrationTest.java b/web/test/tests/IndexIntegrationTest.java index 06bed86c0..31dbd8f93 100644 --- a/web/test/tests/IndexIntegrationTest.java +++ b/web/test/tests/IndexIntegrationTest.java @@ -116,6 +116,8 @@ public static Collection data() { { "q.subject:Westfälen", /*->*/ 11 }, { "q.subject:Lithuania", /*->*/ 1 }, { "q.subject:Baukem", /*->*/ 1 }, + { "q.subject:\"https\\://d-nb.info/gnd/4040795-0\"", /*->*/ 1 }, + { "q.subject:\"https\\://d-nb.info/gnd/4042570-8\"", /*->*/ 2 }, { "q.subject:4040795-0", /*->*/ 1 }, { "q.subject:4042570-8", /*->*/ 2 }, { "q.title:der", /*->*/ 0 }, @@ -125,6 +127,9 @@ public static Collection data() { { "q.all:Fédérale", /*->*/ 5 }, { "q.all:(Courtillon cinema)", /*->*/ 1 }, { "q.all:(Courtillon cinéma)", /*->*/ 1 }, + { "q.all:\"https\\://d-nb.info/gnd/4040795-0\"", /*->*/ 1 }, + { "q.all:\"https\\://d-nb.info/gnd/4042570-8\"", /*->*/ 2 }, + { "q.all:\"https\\://d-nb.info/gnd/5253963-5\"", /*->*/ 1 }, { "q.all:4040795-0", /*->*/ 1 }, { "q.all:4042570-8", /*->*/ 2 }, { "q.all:5253963-5", /*->*/ 1 },