Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change related.issn to array and delete - #1828 #1916

Merged
merged 7 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -350,7 +350,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 @@ -362,6 +363,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 @@ -79,7 +79,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 @@ -74,7 +74,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 @@ -60,7 +60,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 @@ -55,7 +55,7 @@
} ]
},
"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 @@ -75,7 +75,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 @@ -55,7 +55,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
Loading