NOT operator in smart groups

Does anyone know if there’s any way to build a (boolean) smart-group search that would find a given search term that’s in EITHER the “name” or “tag” fields of files, but not in BOTH at once? (If I just build a search for my term in “name,” the resultant smart group contains the tag with that name - and therefore all files tagged with it – and ALSO, as separate, duplicate search results in the smart group, any of those same tagged files that had the search term in their names.)
In Boolean terms, I’d imagine a search like: (TAG=“blake” OR NAME=“blake”) NOT (TAG=“blake” AND NAME=“blake”)
Or maybe it would work to just search: NAME=“blake” NOT (TAG=“blake” AND NAME=“Blake”)
But I don’t know how to implement either of those in a DTPO search.

Do you mean something like this…
Files… Screen Shot 2018-02-23 at 12.29.57 PM.png

Smart Group Results… Screen Shot 2018-02-23 at 12.30.24 PM.png

Sorry, Jim –
Does your screen-grab show a file with the word “not” in its name? Because if so … that isn’t what I meant.
I meant a situation where some files have the term “blake1”(for instance) in their name and tag, and some only in their name, and some only in their tag – and I want to make a smart group that calls up a list of all three kinds of file, but without repeating any of them.

Screen Shot 2018-02-23 at 1.03.40 PM.pngScreen Shot 2018-02-23 at 1.05.04 PM.png

No, It’s just the name I used. Are you trying to not see the Tag group too?

My aim is to see the contents of the tag group, and any files not in that group but with the tag-word in their name. As things stand, I can only get a search to yield the contents of the tag group PLUS all files with the tag-word in their name – which then have among them all the files that were already in the tag group but also had the tag-word in their names. When a search returns dozens or hundreds of files, it’s exhausting to keep track of the ones that I’m seeing because they have the tag-word in their name, but that I’ve ALREADY seen because they were also in the tag-group that also came up in my search. (I’m sorry if this is hard to follow! Welcome to my life as a biographer…)

If you’re including the Tags group, you are not going to avoid the “appearance” of duplicates, but I suggest you either exclude groups or ignore the contents of the Tags. Anyways, here is a short screencast showing an exclusion (and briefly showing the contents of the Tags group I think you should ignore). If you closely examine the structure of the criteria, you’ll see it’s pretty logical.

PS: Hold Option to create sub-criteria (just like Smart Folders in the Finder). … e.mp4?dl=0

And here’s an alternate configuration…

I must be missing something obvious here, so I apologize if that is the case. Why doesn’t the following give you what you are looking for? Documents will not appear twice in the list just because they have a term in the name and also as the tag. This smart group (using one of my existing tags STC as an example, finds all documents tagged STC as well as all documents containing the name STC, but those documents containing both don’t appear in the list of results twice. The tag group is not displayed, even though its contents are, because the tag group is not Kind>is>any document.
Screen Shot 2018-02-24 at 07.35.36.png

Adding one more twist to this, if documents are tagged according to the customary process where documents are NOT created directly in a Tag group, then one could individually exclude tag groups from searches using the tag’s info panel. Then the simple search pictured below would return all documents AND groups with the search term in the name as well as all documents AND groups with the search tag attached, but NOT the Tag group. Not exactly what the user is looking for, but may be useful for someone.
Screen Shot 2018-02-24 at 07.44.46.png

I guess I was just as confused as you, Greg. It appears he wants all three matched: named Blake (with and without Tag Blake), and just tagged Blake.

Well, my Smart Group shows a solution that also may be useful to someone. :smiley:

Brilliant solutions! – Gives me just what I need.
My problem is that some files are NAMED something (eg "Blake) and others are TAGGED with that same term (eg “Blake”) and I want a list that includes all of them without repetitions – and you have now made that possible.
Can’t thank you enough for having spent so much time on this.


Which solution was what you were looking for?

Mostly yours, Jim – But also interested to know I can exclude the tag group.
The only thing that I gather I cannot do, that I’d like to, is have DTPO give me a list groups with a given term in their name but not tags named with that term – because I gather groups and tags are actually the same thing, deeper in the architecture of the database.

Just select all the tags at once that are in the Tags group, show the info, and check exclude from searching. There is no reason to have search enabled for a tag group if you never want the tag group to appear in your search results. Documents and other groups that have been tagged will still show up in search results, as excluding a tag group from searching does not disable searching for the actual tag. The only downside is that you will have to continually do this as you add new tags. The easiest way to perhaps do that is wait until these tag groups show up in a search/smart group, then select them, show info, and check exclude from searching.

And of course all I have to do to see a tag and its contents is go direct to it in the “tags” group…