How to use multiple metadata values?

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.

Understanding the search lexicon

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.

Ah, interesting. I tried adding another word to what was a single-word metadata field, and indeed- I got another line in the index. Thanks.

Refer to the section named Value lookup of the article: What is document metadata?

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.


Out of curiosity, if they were separated by commas would that also work? Or are spaces the only delimiter allowed?

Case 1: When used as lookup options for the metadata type the commas as required.

Case 2: When used as multiple values for single document metadata value, the comma might cause search issues as it might get indexed as part of the value.

1 Like

Thank you, that is a clear explanation.

1 Like

This topic was automatically closed 8 hours after the last reply. New replies are no longer allowed.