Structured metadata pseudo-array using "string" with comma-delimited data
My company has need of an array type field for structured metadata. This currently doesn't exist as an option for "Cloudinary Assets" (formerly DAM). To address this need, I have been given the recommendation to use a
string type and have the value be a comma-delimited set of data. This seems to work, but there are some odd behaviors with queries in this approach.
For my example, I have 5 images using a metadata string field with comma delimited values:
If I use Advanced search in the UI on this field to query when the value contains
1, then I get the three results of: #1, #2, and #3 (which doesn't seem to make sense because I'd expect two or all five). The UI query for this is:
Similar unexpected behavior appears if I search
(metadata.field:"11*") where I get two results instead of only one that I would want (even three results would be understood although I don't want that many).
However, if I manually change the query and remove the wildcard to
(metadata.field:"1") I get the two correct expected results of #1 and #2. However, I can't do an UI Advanced search for this query because the most relevant option is "equal to" and makes a query of
(metadata.field="1") which gives no results. This can be corrected in Query Builder however.
Is my understanding of these behaviors correct, and the proper method to use? My company is about to undergo a major migration of content from our legacy system and will translate array type fields to Cloudinary using this approach. If there is a better option I'd love to hear about it.
Ideally I would like an
array type option for Structured Metadata, but that may never happen or would not happen any time soon. "Tags" behavior is what we are looking for, but not as a general tags field, and instead targeted to a specific metadata field. We can't use a
set because it is impossible or extremely difficult to manage set members of all possible strings that could be added (think numbers or IDs).
If anyone has done something like this, please respond oh what you did.