• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

Did I finally crack it?...

Status
Not open for further replies.

Johan Elzenga

Lightroom Guru
Lightroom Guru
Premium Classic Member
Premium Cloud Member
Joined
Jul 2, 2015
Messages
14,026
Location
Netherlands
Lightroom Experience
Power User
Lightroom Version Number
Any version of Lightroom Classic or earlier
Operating System
  1. Other (please note in thread)
You may remember the famous 'John Smith' keyword problem, discussed here many times. Imagine you have three people, called 'John Smith', 'Jane Smith' and 'John Jones'. You want to create a smart collection that searches for images of John Smith. The problem is that 'Contains John Smith' or 'Contains Words John Smith' does not work, because this wil also find images of Jane Smith and John Jones together. Adding a line 'Does not contain Jones' does not work either, because you may have images of John Smith and John Jones together, and these will now be excluded.

Recently we thought that we found the answer. Instead of using 'Contains John Smith' or 'Contains Words John Smith', you should use 'Start with John Smith'. That will work fine with these three people. Unfortunately however, what we didn't think of was the possibility of a fourth person, called 'John Smithson'. That will break this solution again, because John Smithson starts with John Smith... Sure, this may be a rare example, but it's a possibility nevertheless and it seemed that once again there is no answer.

I believe I finally cracked it and found the ultimate solution. And it's even quite simple! Create a smart collection with two criteria that both must be met:
- Contains Words 'John Smith'
- Start With 'John Smith'

What do you think? Did I finally crack it, or did I still miss something?...
 
At first glance, it appears that it should work.
 
At first glance, it appears that it should work.
Would it not be easier to use an underscore to join two keywords, e.g. John_Smith?

Phil
 
Sure, and you can do that also with a (non-exporting) synonym, so you can search on the synonym and still keep the (exporting) keyword phrase with the space. But the challenge was not to do that and try to find a way to search for 'John Smith' without getting these false positives.
 
I don't use Smart Collections, so I may not have it right, but what if the keyword list doesn't Start With "John Smith"? Or does "Start With" mean "any of the keywords starts with"?
 
I don't use Smart Collections, so I may not have it right, but what if the keyword list doesn't Start With "John Smith"? Or does "Start With" mean "any of the keywords starts with"?
Any of the keywords assigned to that image. Start with means that one of the the keywords must start with those characters for the image to be found. So if you have an image with the keyword ‘Jane Smith’, then “Contains Smith” will find that image, but “Starts with Smith” will not.
 
This whole problem would be moot if Adobe would simply allow us to search with embedded spaces. Even Google allows this.

-end of rant....
The problem once introduced is not easily overcome. Adobe converts the criteria list into a standard SQL statement using SQL reserved words such as SELECT, FROM, OR, and AND. Some where in the Adobe logic at the time the space between Keywords was decided to be interpreted as the SQL language reserved word AND. In the SQL Language SELECT phrases (keyword phrases) are enclosed in quotes. So that "John Smith" is a complete phrase including the space. Adobe could recite the conversion of Criteria logic such that the 'Contains' field is enclosed in quotes to that enclosing quotes are honored in the field such that "John Smith" is considered one phrase and John Smith is interpreted as two phrases. However, doing this will break any existing Smart Collection that depends on the space to be interpreted as the SQL AND.
 
Status
Not open for further replies.
Back
Top