Skip to content

Commit

Permalink
Merge #1916 from remote-tracking branch 'origin/1828-relatedIssn'
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Apr 16, 2024
2 parents 9d1e8a3 + 35e4aac commit 5137d0f
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ do list(path:"775??|776??", "var":"$i")
paste("related[].$last.note[].$append","$info", "$note")
replace_all("related[].$last.note[].$last", "Erscheint auch als ","")
copy_field("$label", "related[].$last.label")
copy_field("$issn", "related[].$last.issn")
set_array("related[].$last.issn[]")
copy_field("$issn", "related[].$last.issn[].$append")
set_array("related[].$last.isbn[]")
isbn("$isbn", to:"isbn13")
copy_field("$isbn", "related[].$last.isbn[].$append")
Expand All @@ -361,6 +362,7 @@ end

do list(path:"related[]", "var":"$i")
uniq("$i.isbn[]")
replace_all("$i.issn[].*","-","")
end

replace_all("related[].*.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!")
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/alma/index-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,15 @@
"type": "text"
},
"issn": {
"type": "keyword",
"type": "text",
"analyzer": "hyphen_analyzer",
"copy_to": [
"q.all"
]
},
"isbn": {
"type": "keyword",
"type": "text",
"analyzer": "hyphen_analyzer",
"copy_to": [
"q.all"
]
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990108873860206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"id" : "http://lobid.org/resources/ZDB-1027374-8#!",
"note" : [ "Druckausg." ],
"label" : "Behavioural pharmacology",
"issn" : "0955-8810"
"issn" : [ "09558810" ]
} ],
"inCollection" : [ {
"id" : "http://lobid.org/organisations/DE-655#!",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990119186660206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"related" : [ {
"note" : [ "Druck-Ausgabe" ],
"label" : "Know your world extra",
"issn" : "0163-4844"
"issn" : [ "01634844" ]
} ],
"inCollection" : [ {
"id" : "http://lobid.org/organisations/DE-655#!",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/991005935279706485.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"id" : "http://lobid.org/resources/ZDB-2722409-0#!",
"note" : [ "Online-Ausg." ],
"label" : "Wirtschaft und Erziehung.",
"issn" : "0174-6170"
"issn" : [ "01746170" ]
} ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT014846970#!",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99370678063606441.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"label" : "ZDB-Ressource"
} ],
"related" : [ {
"issn" : "0720-6763"
"issn" : [ "07206763" ]
} ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT014846970#!",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99370690532406441.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"label" : "Culturegraph Ressource"
} ],
"related" : [ {
"issn" : "1610-5982"
"issn" : [ "16105982" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/ger",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99370699582506441.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"label" : "DNB-Ressource"
} ],
"related" : [ {
"issn" : "2190-0574"
"issn" : [ "21900574" ]
} ],
"inCollection" : [ {
"id" : "http://lobid.org/resources/HT014846970#!",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99371107766906441.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"label" : "OCLC Ressource"
} ],
"related" : [ {
"issn" : "2471-5506"
"issn" : [ "24715506" ]
} ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/eng",
Expand Down
13 changes: 10 additions & 3 deletions web/test/tests/IndexIntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public static Collection<Object[]> data() {
{ "isbn:9780702075551", /*->*/ 1},
{ "isbn:070-2075-558", /*->*/ 1},
{ "isbn:0702075558", /*->*/ 1},
{ "related.issn:07206763", /*->*/ 1 },
{ "related.issn:0720\\-6763", /*->*/ 1 },
{ "issn:21914664", /*->*/ 1 },
{ "issn:2191\\-4664", /*->*/ 1 },
{ "\"Handbook on policy, process and governing\"", /*->*/ 1},
{ "(+Handbook +on +policy +process +and +governing)", /*->*/ 1},
{ "\"Mülheim an der Ruhr\"", /*->*/ 1},
Expand All @@ -91,6 +95,7 @@ public static Collection<Object[]> data() {
{ "describedBy.resultOf.object.modifiedBy.id:\"http\\://lobid.org/organisations/DE-6#\\!\"", /*->*/ 15 },
{ "\"Reader-friendly\"", /*->*/ 1},
{ "\"Reader friendly\"", /*->*/ 1},
// all q tests are related to DigiBib
{ "q.date:2000", /*->*/ 3 },
{ "q.publisher:Aachen", /*->*/ 2 },
{ "q.publisher:Aachen\\-Eilendorf", /*->*/ 1 },
Expand All @@ -115,9 +120,11 @@ public static Collection<Object[]> data() {
{ "q.all:(Courtillon cinema)", /*->*/ 1 },
{ "q.all:(Courtillon cinéma)", /*->*/ 1 },
{ "q.all:0702075558", /*->*/ 1 },
{ "q.all:07\\-0207\\-555\\-8", /*->*/ 1 },
{ "q.all:07206763", /*->*/ 0 },
{ "q.all:0720\\-6763", /*->*/ 1 },
{ "q.all:07\\-0207\\-555\\-8", /*->*/ 1 }, // search with hyphens possible due to digibib_standardnumber
{ "q.all:07206763", /*->*/ 1 },
{ "q.all:0720\\-6763", /*->*/ 0 }, // search with hyphens not possible, different to lobid general search
{ "q.all:21914664", /*->*/ 1 },
{ "q.all:2191\\-4664", /*->*/ 0 }, // search with hyphens not possible, different to lobid general search
{ "q.all:HT072067630", /*->*/ 0 },
{ "q.all:(Erleben \\- Verstehen & Lernen)", /*->*/ 3 },
{ "q.all:(Lexicography \\: Selected Papers)", /*->*/ 1 },
Expand Down

0 comments on commit 5137d0f

Please sign in to comment.