roda icon indicating copy to clipboard operation
roda copied to clipboard

Transformation Issue in Solr Document Conversion

Open hmiguim opened this issue 5 months ago • 0 comments

When fetching a document from Solr and converting it to POJO, there is a transformation problem: converting multivalued fields into a single string and then converting it back to a list.

Example:

From Solr comes the following field: "permission_users_GRANT":["admin","guest"]

  • the first conversion results in: "[admin,guest]"
  • the second conversion results in: ["[admin,guest]"]

Giving the following result when requested via REST-API:

"permission_users_GRANT": [
      "[admin, guest]"
  ],

Here: https://github.com/keeps/roda/blob/78d156dce3f00c9270a473c85c50a85812d268ef/roda-core/roda-core/src/main/java/org/roda/core/index/schema/collections/FileCollection.java#L328C5-L334C6

hmiguim avatar Sep 03 '24 09:09 hmiguim