-
Notifications
You must be signed in to change notification settings - Fork 7
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
Show weird join field error. #1624
Conversation
do list(path:"$i.a", "var":"$j") | ||
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.label.$append") | ||
end | ||
join_field("isPartOf[].$last.hasSuperordinate[].$last.label", " / ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subfield $a only exists once. But the join_field behaves like there are multiple subfields $a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're joining the initial value " / "
and the subfield value "Studia Judaica"
with your separator " / "
, so the output " / / Studia Judaica"
is correct, isn't it?
To illustrate the individual parts: "(?<initial value> / )(?<separator> / )(?<subfield value>Studia Judaica)"
do list(path:"$i.a", "var":"$j") | ||
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.label.$append") | ||
end | ||
join_field("isPartOf[].$last.hasSuperordinate[].$last.label") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subfield $a only exists once. But the join_field behaves like there are multiple subfields $a.
@@ -70,7 +70,7 @@ | |||
"type" : [ "IsPartOfRelation" ], | |||
"hasSuperordinate" : [ { | |||
"id" : "http://lobid.org/resources/HT001247609#!", | |||
"label" : "Studia Judaica" | |||
"label" : " / / Studia Judaica" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See output here
@@ -70,7 +70,7 @@ | |||
"type" : [ "IsPartOfRelation" ], | |||
"hasSuperordinate" : [ { | |||
"id" : "http://lobid.org/resources/HT002156469#!", | |||
"label" : "DIN-Taschenbuch" | |||
"label" : " / / DIN-Taschenbuch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or here
Not sure about the context, but could something like |
It might be this problem: metafacture/metafacture-fix#261 |
@@ -152,13 +156,19 @@ do list(path: "830??", "var": "$i") | |||
copy_field("$i.w", "isPartOf[].$last.hasSuperordinate[].$last.id") | |||
replace_all("isPartOf[].$last.hasSuperordinate[].$last.id", "^\\(DE-605\\)(.*)$", "http://lobid.org/resources/$1#!") | |||
end | |||
copy_field("$i.a", "isPartOf[].$last.hasSuperordinate[].$last.label") | |||
set_array("isPartOf[].$last.hasSuperordinate[].$last.label", " / ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional, setting the array to " / "
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, are you intentionally not $append
ing the label here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that was an dumb error!
do list(path:"$i.a", "var":"$j") | ||
copy_field("$j", "isPartOf[].$last.hasSuperordinate[].$last.label.$append") | ||
end | ||
join_field("isPartOf[].$last.hasSuperordinate[].$last.label", " / ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're joining the initial value " / "
and the subfield value "Studia Judaica"
with your separator " / "
, so the output " / / Studia Judaica"
is correct, isn't it?
To illustrate the individual parts: "(?<initial value> / )(?<separator> / )(?<subfield value>Studia Judaica)"
The subfield $a only exists once. But the join_field behaves like there are multiple subfields $a.