3

I am able give files multiple tags, but I can't figure out a way to search by multiple tags. The current search syntax in Finder/Spotlight is to use the tag:<some_tag_name> query, however trying to search by multiple tags is not clear.

I have tried these options:

  1. tag:<tag0>,<tag1>
  2. tag:<tag0> <tag1>

For example, I have 3 files - foo, bar, baz - and 2 tags - alpha, beta. foo is tagged with alpha and beta, bar is tagged with only alpha, and baz is tagged with beta.

I have listed several scenarios which should underscore my objective:

  1. A search of tag:alpha,beta should only return foo since it's the only file with both tags.
  2. A search of tag:alpha should return foo and bar
  3. A search of tag:beta should return foo and baz

This should be a simple feature included but I can't quite figure out how to use it.

1 Answer 1

2

As I finished writing my own question, I tried another combination, tag:<tag0> tag:<tag1>, and it worked! Seems like it's an implicit "AND" when you use it like this.

You can also apply boolean logic in Spotlight/Finder:

  • tag:<tag1> OR tag:<tag2>
  • tag:<tag3> AND <tag:4>
  • NOT tag:<tag5>
4
  • If we wanted to do the OR in the search criteria UI do you know what to choose from the 2 dropdowns? E.g. Name matches?
    – malhal
    Commented Feb 24, 2023 at 12:26
  • @malhal I am not quite sure I understand your question. Are you asking on how to search by tags AND a specific string or text in the file name? If so, something like this works: (tag:alpha OR tag:beta) "some-text-here"
    – unjankify
    Commented Mar 3, 2023 at 22:09
  • @malhal: okay I think by "search criteria UI" you are referring to the search bar in "Finder". What I have found to work is to just type in the exact query and to ignore the dropdown: tag:alpha OR tag:beta returns files tagged with either "alpha" or "beta" in Finder
    – unjankify
    Commented Mar 3, 2023 at 22:18
  • Hi, not the search bar but the edit criteria UI with the combo boxes and add button, eg images.techhive.com/images/article/2015/05/…
    – malhal
    Commented Mar 3, 2023 at 22:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .