Skip to main content
areohbee
Legend
October 13, 2011
Question

Lightroom: Exact text match in smart collections and filters, including matching spaces

  • October 13, 2011
  • 131 replies
  • 2835 views
Is there really no way to search metadata for a term that has spaces in it? e.g. "brown hair".

131 replies

johnrellis
Legend
July 9, 2019
Another approximation that gets close in most circumstances for multi-word keywords:

starts with Jane Smith
ends with Jane Smith
JohanElzenga
Community Expert
Community Expert
July 9, 2019
Perhaps this is the answer: create a smart collection with two criteria that both must be true:
- Start with “Jane Smith”
- Contains words “Jane Smith”
That should exclude images that only contain Jane Smithson, but still include images of both Jane & Jane, or Jane Smith and any other person called Smithson.
-- Johan W. Elzenga
JohanElzenga
Community Expert
Community Expert
July 9, 2019
True, you can’t win them all. “Start with words” would be what you need, but unfortunately that does not exist. This is a rare problem however, because it would only occur if you have images of “Jane Smith” and “Jane Smithson”. If “Jane Smithson” does not exist in your library, then you do not have to exclude “Smithson”. Other names that include “smith”, like “Andy Smithson”, will not be found if you search on ‘Start with “Jane Smith”.
-- Johan W. Elzenga
MarcoKlompalberts
Participating Frequently
July 9, 2019
But what if the photo contains both both "Jen Smith" and "Andy Smithson"?
With "does not contain Smithson" you will exclude the photo from your search when it should be included.
JohanElzenga
Community Expert
Community Expert
July 9, 2019
"Here's an easier method. Try 'Start With' rather than 'Contains All' or 'Contains Words'."

Be careful with this. For search terms including multiple words, e.g. "starts with Jen Smith", that can often produce fewer false positives than "contains words", but it can still get them, e.g. "Jen Smithson". 

True, so 'Start With Words' would be the ideal solution (but does not exist). However, this small problem can easily be solved in a smart collection by adding a second criterium 'Does not contain Smithson'.
-- Johan W. Elzenga
Califdan2
Inspiring
July 8, 2019
As can be attested to by the length of this thread, this is a problem many of us "keyword junkies" have and there are a slew of workaround solutions while we wait for years for Adobe to take this problem seriously (which they have so far shown no intention of doing).  

Without re-reading this whole thread is to adulterate the keyword name for the pets to distinguish them from people.  For example:  "Molly(dog)", or "Molly-dog".  then when using a Smart Collection or filter you can use "Molly-dog" when you want the pet and "Molly !dog"  (Exclamation point in filter means "not") when you want the person.  

For similar situations where I am not exporting the keywords in question I bastardize the keyword by adding an asterisk as the 2nd character.  For example, I have a keyword for each shoot.  So, for example, a shoot might have a keyword of "Shoot 2019-03 France & Belgium".  But specific images would have a LOCATION keyword of either France or Belgium.  So, when I search for "France" I get the whole shoot due to the shoot keyword when in fact some of those images are in Belgium.  To get around this problem I changed the shoot keyword to "Shoot 2019-03 F*rance & B*elgium"  

But, sure would be nice to allow filters and Smart Collections to:

a)  support Quote marks to support multi-word keywords (e.g. "Mary Smith") where it would use the full text inside the quotes as one thing and not treat any spaces inside the quotes  as delimiters, 

b)  Allow "the contained in" nomenclature they use in the Keywords Panel.  For example "Red < Bird" meaning the keyword "Red" that is a child under keyword "Bird" or "Molly < Pets" meaning the keyword "Molly" that is a child of keyword "Pets" 
alanterra
Inspiring
July 8, 2019
Just to add to John's comment, sometimes the best solution to make a smart folder do what you want it to do is to introduce a unique string. For instance, if "pets" had been used elsewhere in your keywords, you could use the parent keyword "MyPetsXYZ", and then use that for a search. (Just make sure that the keyword isn't exported!)

I often want to limit a search to a particular folder. I just called this folder "unique123" and set up a smart folder with "any searchable text" contains "unique123". I find it much easier to go to that smart folder and search within it than to find the folder in my folder hierarchy. And I can easily set up smart folders that limit their search to this part of my folder hierarchy.

johnrellis
Legend
July 8, 2019
"My dilemma for this collection is that I am trying to create a collection of photos of all the pets in my life (don't judge me)."

There are a couple of easy ways to accomplish this without resorting to the drastic solution of using synonyms, which I think you may regret down the line.

1. Use the Keywords column of the Library Filter bar. Open the Filter bar by doing Library > Enable Filters, click on Metadata, and choose the Keywords column. Then Cmd/Ctrl-click each pet keyword:



Save that as filter preset "Pets". (I obsess on my pets too :->)

2. Put all of your pet keywords under a parent keyword "Pets". Then use the Library Filter bar and select just "Pets".   Or use the smart-collection criterion:

Keywords contains words Pets

The advantage of a parent keyword is that you don't have to update your saved filter preset or smart collection when you add a new pet keyword.
johnrellis
Legend
July 8, 2019
"Here's an easier method. Try 'Start With' rather than 'Contains All' or 'Contains Words'."

Be careful with this. For search terms including multiple words, e.g. "starts with Jen Smith", that can often produce fewer false positives than "contains words", but it can still get them, e.g. "Jen Smithson".  

But for search terms with a single word, e.g. "starts with Jen", you could end up with more false positives than "contains words", e.g. "Jennifer".

[There used to be a bad bug with "starts with x", where "x" would match the beginning of any punctuation-separated word, e.g. "starts with John" would match "Bob Johnson". See 
https://feedback.photoshop.com/photoshop_family/topics/text_filter_problem?topic-reply-list%5Bsettings%5D%5Bfilter_by%5D=all 

But at some point in the past three years, that got silently fixed. I'll test more and update that bug report.]
johnrellis
Legend
July 8, 2019
I was using "contains all" instead of "contains words." Unfortunately switching to "contains words" made my problem worse (collection went from 754 images to 51,128). 

Hmm, there's more going on here.  Switching from "contains all" to "contains words" can only make the matched set smaller.  "contains all x y" matches all keywords containing the string x and the string y somewhere in the keywords, whereas "contains words x y" matches keywords that have x and y as punctuation-separated "words".

E.g. "contains all john smith" will match the keyword "johnson blacksmith", but "contains words john smith" won't.

Can you post a screenshot of your smart-collection rules using "contains words"?