In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Commit 151fb681 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Fix json array data extraction

If the array is just string then return strings!
parent 52cf37a4
Pipeline #10673 failed with stages
in 1 minute and 51 seconds
......@@ -103,10 +103,13 @@ class SearchDocTransform(mapping: String) {
is JsonObject ->
Pair(targetField, mapOf(Pair(value["@language"], value["@value"])))
is JsonArray<*> ->
Pair(targetField, value.map {
it as JsonObject
Pair(it["@language"], it["@value"])
}.toMap())
Pair(targetField, value.mapNotNull {
when (it) {
is String -> it
is JsonObject -> Pair(it["@language"], it["@value"])
else -> null
}
})
else -> {
log.error("Could not parse literal value: $value.")
null
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment