# Smart Collection for people



## BMC2611 (Aug 18, 2016)

Can anyone tell me how to create a Smart Collection based on people's names?

If I create one with _Keywords > contains all > John Smith_ (for example), it includes any photo that has a John in it *and* a Smith in it.

What I want is for it to include *only* photos of John Smith specifically.

I hope this makes sense. Any advice is appreciated.


----------



## Johan Elzenga (Aug 18, 2016)

in this case use two lines, and select that both lines must be true:
Keywords contains word John
Keywords contains word Smith

The only limitation is that this will also show images with John Jones and Mary Smith in one and the same photo.


----------



## BMC2611 (Aug 18, 2016)

Thanks for the reply Johan, but this doesn't solve the problem.

Along with photos of _John Smith_, the collection will still include photos that contain both _John _Jones and Jane _Smith_ (for example).


----------



## Johan Elzenga (Aug 18, 2016)

BMC2611 said:


> Thanks for the reply Johan, but this doesn't solve the problem.
> 
> Along with photos of _John Smith_, the collection will still include photos that contain both _John _Jones and Jane _Smith_ (for example).



Yes, I know that and that's what I said, didn't I? I said: "_The only limitation is that this will also show images with John Jones and Mary Smith in one and the same photo._" If you do have photos like this, there is only one solution unfortunately. Edit the keyword John Smith (and all the other people keywords) and add a (non-exporting) synonym 'JohnSmith'. Then you can setup your smart collection so it searches on these synonyms. This has been discussed at length in this forum some time ago, and nobody knows a simpler solution.


----------



## BMC2611 (Aug 18, 2016)

How is your first suggestion of creating two lines any different to having *Keywords > contains all*?

Thanks for the synonym suggestion, I'll give that a try. Not sure why you didn't just explain that clearly in your first reply...


----------



## Jim Wilde (Aug 18, 2016)

"Contains All" should work (well, it certainly does for me)....if you are getting other images in the smart collection, you need to examine their keywords carefully. Perhaps post a screenshot of the Keywording panel (set to Keywords & Containing Keywords) for an image which appears in the results of the SC, but which you think shouldn't.


----------



## johnbeardy (Aug 18, 2016)

If you have two lines of keyword, make Match = "all", then "Keywords contains word John" and "Keywords contains word Smith" will only return "John Smith" and "Smith John".

I wouldn't use synonyns or "fake metadata" for this. You'll just find them in files you export or find some other problem somewhere down the line.


----------



## BMC2611 (Aug 18, 2016)

Jim Wilde said:


> "Contains All" should work (well, it certainly does for me)....if you are getting other images in the smart collection, you need to examine their keywords carefully. Perhaps post a screenshot of the Keywording panel (set to Keywords & Containing Keywords) for an image which appears in the results of the SC, but which you think shouldn't.



'Contains All' does include the photos I want - i.e. those of _John Smith_. But it also includes images that contain both _John _Jones and Jane _Smith_, for example.

I understand why it does this as the image does contain the keywords _John _and _Smith_. But I want to include only "_John Smith_"!


----------



## BMC2611 (Aug 18, 2016)

johnbeardy said:


> If you have two lines of keyword, make Match = "all", then "Keywords contains word John" and "Keywords contains word Smith" will only return "John Smith" and "Smith John".
> 
> I wouldn't use synonyns or "fake metadata" for this. You'll just find them in files you export or find some other problem somewhere down the line.



Jim, I have tried the two lines and this doesn't seem to work.

The SC will still include images that contain both _John _Jones and Jane _Smith_, for example. I only want images of _John Smith_.


----------



## johnbeardy (Aug 18, 2016)

Match should be set to "all"


----------



## BMC2611 (Aug 18, 2016)

johnbeardy said:


> Match should be set to "all"



It is set to "All", but it will still include images that have both a _John _and a _Smith _in, that aren't _John Smith_.


----------



## Jim Wilde (Aug 18, 2016)

BMC2611 said:


> 'Contains All' does include the photos I want - i.e. those of _John Smith_. But it also includes images that contain both _John _Jones and Jane _Smith_, for example.
> 
> I understand why it does this as the image does contain the keywords _John _and _Smith_. But I want to include only "_John Smith_"!



As I said, it works for me (on both Windows and OSX), so let's have a look at a screenshot.

I have 3 images, one contains only one keyword "John Smith", one contains only "Jane Smith", the other contains only "John Jones". A smart collection>Contains All>John Smith returns only the one image containing the John Smith keyword.


----------



## tspear (Aug 18, 2016)

BMC2611 said:


> It is set to "All", but it will still include images that have both a _John _and a _Smith _in, that aren't _John Smith_.


This has been discussed many times on here. There are a few basic solutions. Pick one:

Create a synonym as Johan stated and search for synonym
Use underscores in your key words instead of spaces
Clean up the results manually after (usually when exporting or to a static collection)

Change your friends so they do not overlap names
The last possible option is convince Adobe to change the smart collection system (Good luck, this has been a request for a long time)


----------



## BMC2611 (Aug 18, 2016)

Jim Wilde said:


> As I said, it works for me (on both Windows and OSX), so let's have a look at a screenshot.
> 
> I have 3 images, one contains only one keyword "John Smith", one contains only "Jane Smith", the other contains only "John Jones". A smart collection>Contains All>John Smith returns only the one image containing the John Smith keyword.



Jim, what you have done is fine. But if you had an image that contained _John _Jones and Jane _Smith  _that would be included in the collection. I want a collection with only _John Smith_.


----------



## BMC2611 (Aug 18, 2016)

tspear said:


> This has been discussed many times on here. There are a few basic solutions. Pick one:
> 
> Create a synonym as Johan stated and search for synonym
> Use underscores in your key words instead of spaces
> ...



Thanks for the advice, I understand the solutions now.

I know I could also just filter by keyword but that seems too much effort!


----------



## johnbeardy (Aug 18, 2016)

BMC2611 said:


> It is set to "All", but it will still include images that have both a _John _and a _Smith _in, that aren't _John Smith_.



No it won't. Match set to All, and two keyword criterion lines - one set to contains John, the other contains Smith.


----------



## Johan Elzenga (Aug 18, 2016)

johnbeardy said:


> No it won't. Match set to All, and two keyword criterion lines - one set to contains John, the other contains Smith.



John,
This has been discussed at length. If your smart collection must match two lines, one set for John and one for Smith, you'll get only photos that contain both 'John' and 'Smith'. That is correct. Unfortunately however, that means you will also get photos of the good friends *John* Jones and Mary *Smith* together on their sailing trip. You can't add a third line that excludes 'Mary' either, because that means you won't get any of the wedding pictures of John and Mary Smith. There simply is no way around this, except make keywords that are unique through an underscore, or (more elegant in my opinion) use unique synonyms.


----------



## BMC2611 (Aug 18, 2016)

johnbeardy said:


> No it won't. Match set to All, and two keyword criterion lines - one set to contains John, the other contains Smith.



John, I have uploaded two screen shots. The first shows the two lines as you have suggested. The second shows that an image which has the keywords _John Jones _and _Jane Smith _is included in the Smart Collection, as one would expect as the two criterion are met.

The synonym suggestion sounds best to me.


----------



## johnbeardy (Aug 18, 2016)

OK, I see! Personally, I never use synonyms except for the purpose for which they intended. It's extra work, and it will bite you in the long run.


----------



## Johan Elzenga (Aug 18, 2016)

johnbeardy said:


> OK, I see! Personally, I never use synonyms except for the purpose for which they intended. It's extra work, and it will bite you in the long run.



I see absolutely no reason why this would bite you in the long run.


----------



## johnbeardy (Aug 18, 2016)

All fake metadata eventually causes some kind of problem. Short term it can turn up in exported files, long term when you migrate to whatever app you use after Lightroom.


----------



## Johan Elzenga (Aug 18, 2016)

johnbeardy said:


> All fake metadata eventually causes some kind of problem. Short term it can turn up in exported files, long term when you migrate to whatever app you use after Lightroom.



That is why I suggest to use non-exporting synonyms. Yes, if you would ever migrate to an alternative for Lightroom, that may (or may not) cause a problem. So in that case you simply delete the synonym from the keyword before you do so. A small price to pay for having a system right now that actually works, if you ask me.


----------



## johnbeardy (Aug 19, 2016)

So people now have to remember to set those keywords to non-exporting? Then later they wonder why the keyword "John Smith" isn't exported to Flickr or whatever? They figure that out - and then find fake metadata goes along for the ride too? Apart from introducing unpredictable ways to waste time and energy, there was a good example of my "break the rules and it'll bite you in the end" in exactly this area. IIRC it was back in Lr3 when Lr ignored the do-not-export flag, and it took months to for Adobe to resolve the issue. I recall one client had used non-exporting keywords to record stock agency submissions and went ballistic when he found he was submitting photos to Alamy with Getty, Corbis etc in the keywords. Not good.

Adobe's implementation of search criteria is distinctly second-rate, and it would be great to search for the exact words "John Smith". But there are plenty of other ways in which Lr can't do things we'd probably all want. Rather than following bad practice, we find ways around or accept we can't do something exactly as we want. 

In this case the user can simply double click the keyword to find John Smith. I've not tried this (ridiculous) idea, but if a smart collection is really needed, the user can add a keywords doesn't contain "a b c d...." (ie all the letters not in "John Smith") or some variation on that suggestion.


----------



## Johan Elzenga (Aug 19, 2016)

I can't check this right now as I'm typing this on my iPad, but as far as I know, you can setup the keyword in such a way that the keyword itself *will* be exported, and the synonym will *not* be exported. That's exactly why I think this is a more elegant solution than using an underscore in the keyword itself.

Of course, this would all be irrelevant if Adobe fixed this bug where you can create keyword phrases, but you can't use them in smart collections.


----------



## Johan Elzenga (Aug 19, 2016)

OK, I'm back behind my Macintosh now. Here's what I mean. The keyword 'John Beardsworth' *will* be included if you export images or use a plugin to publish them, but the synonym 'JohnBeardsworth' *won't* be included in any exported file.


----------



## BMC2611 (Aug 18, 2016)

Can anyone tell me how to create a Smart Collection based on people's names?

If I create one with _Keywords > contains all > John Smith_ (for example), it includes any photo that has a John in it *and* a Smith in it.

What I want is for it to include *only* photos of John Smith specifically.

I hope this makes sense. Any advice is appreciated.


----------



## Johan Elzenga (Aug 19, 2016)

johnbeardy said:


> In this case the user can simply double click the keyword to find John Smith. I've not tried this (ridiculous) idea, but if a smart collection is really needed, the user can add a keywords doesn't contain "a b c d...." (ie all the letters not in "John Smith") or some variation on that suggestion.



Nope. That won't work either, because that will *not* show Johns wedding pictures. That's because 'Mary Smith' happens to be in those pictures too and here name contains an 'a' so these images will be excluded. 

The problem is that you want to _exclude_ pictures with two people who match 'John' and 'Smith' (like _John Jones_ and _Mary Smith_), but at the same time these people could also be _in a picture together_ with John Smith and then you don't want to exclude them. Catch 22.


----------



## johnbeardy (Aug 19, 2016)

And then you won't be able to export other synonyms which are with that keyword.  

I still think it's a bad practice that will cause pain somewhere down the line, though I'd agree synonyms are better than adding characters to the keyword itself.


----------



## Johan Elzenga (Aug 19, 2016)

johnbeardy said:


> And then you won't be able to export other synonyms which are with that keyword.
> 
> I still think it's a bad practice that will cause pain somewhere down the line, though I'd agree synonyms are better than adding characters to the keyword itself.



Who says there are other synonyms with that keyword? Do you see any? We're talking about names of people for crying out loud. What other synonyms would you expect to want to export? And why couldn't you simply add them to the keyword in that situation? I really think you are trying to create a problem that isn't really there.


----------



## johnbeardy (Aug 19, 2016)

JohanElzenga said:


> I really think you are trying to create a problem that isn't really there.



No, I'm speaking from experience of being asked how to sort out many problems with metadata, going back way before Lightroom too. Bad practices always come back to bite you.

Apart from requiring user effort, your synonym method means there _cannot_ be any other synonyms for that keyword. For people, it's common to have unmarried names, nicknames etc, and in any case this issue isn't just confined to people's names. If the price of doing something _exactly_ as you want results in bad practice, maybe accept that it's not worth doing or find other ways to approach it.


----------



## Johan Elzenga (Aug 19, 2016)

Think out of the box. If you have synonyms like unmarried names and nicknames and so on, the problem doesn't exist in the first place. Just use those synonyms as well ('match all') in your smart collection! The chance that some other photo will *not* show this person, but _*will*_ contain all those names, is practically zero. You can decide that per person. And besides; there is no reason why my wife's maiden name could not be part of the keyword and must be a synonym. It is her full name after all...


----------



## tspear (Aug 19, 2016)

I am not at home with Lr, but I wonder has anyone tried using other characters. Like a tab?
I wonder what Lr is using to break the phrases apart in the smart collection parser. If only looking for a "space" then using tabs or some other character would work.


----------



## Johan Elzenga (Aug 19, 2016)

You can't add a tab, because you will tab out of the keyword entry field to the next field if you try. Other characters will probably have similar problems, or won't show as a space so your keyword looks like 'JohnDoe' rather than 'John Doe'. And you can create problems when exporting images...


----------



## shelleyfest (Apr 14, 2020)

Has this EVER been solved?  Seems like such a simple thing, yet I read this entire thread and there seems to be no solution.  How simple it would be if you could just put quotes or brackets  around your criteria so it could include the space as part of the criteria... 

Keyword contains "John Smith"

Then it would include:

John Smith, John Jones, Mary Smith, Smith Vacation, Canada
John Smith, Bob Barker, Television Show

But NOT include:
John Jones, Mary Smith, Smith Vacation, Canada

This is such a simple thing... why does Adobe make it so hard?


----------



## John Little (Apr 14, 2020)

One way to solve it informally would be to create your own personal "database" of names, each followed by something like a number, as in John Smith 1 and Bob Jones 3. Then the actual keyword would be "John Smith 1". This could be kept organized in an Excel spreadsheet, for instance. This would be pretty tedious to implement if you have a lot of names, but perhaps better than the ambiguities discussed above. Adobe could also implement it, I'm not sure how hard it would be to add into LR.


----------



## johnbeardy (Apr 14, 2020)

I wouldn't recommend using artificial keywords - sooner or later you'll be coming back asking how to remove all these 1s or 2s. Funny how earlier in the thread I came up with the term "fake metadata" as long ago as 2016 - where's the copyright application form?


----------



## Johan Elzenga (Apr 14, 2020)

Try ‘Keywords *begins with* John Smith’.


----------



## shelleyfest (Apr 14, 2020)

Turns out there IS a simple solution.  Just change the criteria to

Keyword STARS WITH John Smith

This does not work the way you would expect.  "John Smith" can be anywhere in the keyword text, not necessarily the first item.

But it works!


----------



## Johan Elzenga (Apr 14, 2020)

It does work as expected, if you understand how it works.  ‘Begins with’ does not mean that *all your keywords combined *must begin with ’john smith’, but that *any one keyword phrase* begins with ‘john smith’. That means that an image with ‘john doe’ and ‘mary smith’ as keywords won’t be found, because neither keyword begins with ‘john smith’. So this only goes wrong if have a keyword like ‘john smithson’ as well as ‘john smith’.


----------



## John Little (Apr 14, 2020)

Johan Elzenga said:


> It does work as expected, if you understand how it works.  ‘Begins with’ does not mean that *all your keywords combined *must begin with ’john smith’, but that *any one keyword phrase* begins with ‘john smith’. That means that an image with ‘john doe’ and ‘mary smith’ as keywords won’t be found, because neither keyword begins with ‘john smith’. So this only goes wrong if have a keyword like ‘john smithson’ as well as ‘john smith’.


Perhaps Adobe can add another choice under "Other Metadata/Keywords" like "doesn't start with", giving "doesn't start with john smithson"


----------



## Johan Elzenga (Apr 14, 2020)

John Little said:


> Perhaps Adobe can add another choice under "Other Metadata/Keywords" like "doesn't start with", giving "doesn't start with john smithson"


Unfortunately, that would not solve all possible problems. That would also hide an image of john smith together with john smithson...


----------

