Let’s say, I have a “one-to-many” metadata field. E.g., the key is “people_present_in_picture” and the values can be ‘Alice’ AND ‘Bob’ AND ‘Mary’ etc.
Is that a workable approach as far as indices and smart links go? If so, how do I separate values? With a space? With a comma? How do I extract individual values if I want, say, all pictures with Alice in them?
So far, I have the impression that the system treats the value of a metadata key simply as a string - whether space- or comma-separated.
In my experience the metadata value fields are “searchable” fields, that means that they are handled by the search backend. When the index is built up for this field, the string is split up into single words (whitespace as a separator, maybe there are more). As in every search field, you can use a search method (partitial, exact, regex) to find Alice and Bob from the index. Single characters and stop-words excluded.
How do I do that, please? I go for Values → Lookup, and that gives me a dropdown of Filters and Tags. I see ‘first’ and ‘last’ there, but I still don’t see how to pull off what Rosario is talking about in “Metadata checkbox or multiple choice?”. More guidance would be appreciated. Thanks.
Enter a comma separated list as @tomkolp mentioned. That will turn the metadata entry from a text field to a dropdown widget:
If you want to enter multiple values for a single metadata field, them just enter them separated by spaces as @twp mentioned. All values will be indexed for search and findable either individually or together using an AND style search.