• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
53

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

LEGEND ,
Oct 13, 2011 Oct 13, 2011

Copy link to clipboard

Copied

Is there really no way to search metadata for a term that has spaces in it? e.g. "brown hair".

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
replies 131 Replies 131
Community Expert ,
Jul 09, 2019 Jul 09, 2019

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 09, 2019 Jul 09, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2019 Jul 09, 2019

Copy link to clipboard

Copied

"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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

"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:

RackMultipart2019070840471o3h9-c580e01f-5c26-41e7-af2a-676e9d3215e2-896980195.png

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

"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%5Bsettin... 

But at some point in the past three years, that got silently fixed. I'll test more and update that bug report.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

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"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

Here's an easier method. Try 'Start With' rather than 'Contains All' or 'Contains Words'.
-- Johan W. Elzenga

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

Marco,

Thank you for your suggestions of using synonyms. I tried it for this smart collection and it seems to have solved my problem. I will have to start using synonyms when I run into problems like this and then go back and edit my existing keywords as I have time. I have just short of 450 people in my catalog so it is a little frustrating to consider editing that many keywords as a work-around for something Lightroom should do easily.

I also appreciate learning about your workflow tags. I always love to see how other people make the program work for them.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

John,

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). But thank you for making me aware of the distinction because it solved a different problem I was having.

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). This would include ten (so far) keywords. Originally I was only using a first name for the pets' keywords but there are several of the pets (Riley, Molly, Abbey, and Addison) who share the name of real people in my collection.  So I thought adding last names to my pets' keywords would solve the problem but that led me to stumbling upon the problem which is the topic of this thread - Lightroom doesn't recognize spaces in keywords. So, for example, a smart collection containing the words "Riley Findlow" (my dog) includes false positives for any picture that includes the person "Riley Robertson" plus anyone in my family whose last name is Findlow. This leads me to the conclusion that smart collections are useless. If I wanted to wade through thousands of pictures to find the ones of my pets, I could do that in File Explorer on my computer.

I appreciate you feedback (especially because that explained why looking for pictures of Niko also pulled in every picture I'd taken on my Nikon). I will just have to hope Adobe cares enough to make what seems like an easy and intuitive fix.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

My workaround is to create keywords (that don't export) without spaces.
They are like placeholders to filter more easily on.
Instead the real keyword (with spaces) is in the synonyms.

RackMultipart20190708526151geu-a65ca293-547c-46e7-aaf0-f2e86267fd46-2077719910.JPG

This would be how I would tag a photo that has me in it.
For people in my family tree, a unique identification number (RIN051 in this case) is used that corresponds to the ID number in the family tree database.
But my friend John Doe would have JohnDoe as non-exporting keyword, and John, John Doe and Doe as synonyms.

I use this for workflow as well, but without synonyms, because I won't be exporting these workflowkeywords at all.
Some examples:
  • DoNotX > I have culled these photos and although they are no picks, I don't want to reject them.
    So a smart collection for culling might look like:
    Keywords doesn't contain "DoNotX" and Flag is "Unflagged"
  • ToTagPeople> I haven't tagged all the people in this picture yet
  • TaggedPeople> All people are tagged (if I would create a smart filter based on "Tag People", these might show up as well) 


Like John R. Ellis says you can also use the library filter.
Or you can look up the keyword in the keywordlist and click the arrow on the right side. That will also return any image that contains that keyword.
RackMultipart20190708166601aul-1e7d42e5-d1d6-4276-9551-bf1c08decc70-1221888722.JPG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2019 Jul 07, 2019

Copy link to clipboard

Copied

"I want a smart collection that pulls in John Smith, but it is also pulling in John Doe and Mary Smith"

It sounds like you're using the "contains" operator, e.g.
Keywords contain John Smith
That will match photos that contain the string "John" or "Smith" anywhere in their keywords.  E.g. it will match a photo with the single keyword "Johnson" and a photo with the single keyword "blacksmith". 

Instead, use "contains words":
Keywords contains words John Smith
This will match photos that contain both "John" and "Smith" in their keywords as punctuated-separated "words". That will significantly reduce the number of false matches, though you can still get some; e.g. it will match a photo with the two keywords "John Doe" and "Bob Smith".

You might consider using the Library Filter bar instead of smart collections -- its Metadata browser is the only way to get exact keyword match (without using a plugin), and you can search for a keyword with a single mouse-click.  See the end of this post for details:

https://forums.adobe.com/message/11153430#11153430

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2018 Dec 19, 2018

Copy link to clipboard

Copied

First of all, merging these post LEAVES OUT a lot of pertinent information from the other posts that seem to be relevant to the issue.  The only way to see them is to follow the links.  Makes it more difficult to resolve issues

Onto the main topic.
This comment is from a linked post.

RackMultipart2018121986461zg2g-c4e1f718-e49c-44de-a124-84e290611487-1569524491.jpg
Johan's above suggestion works great.  As this smart collection filter has been requested in several posts I would think I should be fairly easy to add a choice in the smart collection to do this as in the above scenario.  The filtering programming code is already written as it works as above so it just needs to be added to the smart collections.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

As I said, it's approximate -- "Contains Words" excludes more than "Contains" or "Contains All", but it doesn't exclude all the unwanted keywords.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

Thanks for commenting but unfortunately this results in inclusivity not exclusivity

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 10, 2018 Sep 10, 2018

Copy link to clipboard

Copied

"Contains Words" is often a good approximation of exact keyword match, though it sometimes gives false matches.

The Any Filter plugin lets you do exact match on keywords, as well as several hundred other photo fields.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

 Surely you can
Anyone having a basic knowledge of database programming can. Actually, the right questions are : Do they want ? Do they care ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

How serious a photographer can you be if all the information you need about the pictures you have taken is what AI can provide?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

I'm sure Brian O'Neil Hughes will also say that an iPhone is a great camera.
-- Johan W. Elzenga

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 21, 2017 Oct 21, 2017

Copy link to clipboard

Copied

Scary !!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

"To get only complete words returned, use Contains Words."

Excellent point.  After seven years, I still forget the differences between Contains, Contains Words, and Contains All and have to look them up: https://helpx.adobe.com/lightroom/help/finding-photos-catalog.html

 Contains Words is generally the most useful and the one I recommend (but I got confused this time).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

One thing you have to watch out for using "Contains" or "Contains All" is they do not match just complete words, but will match parts of words as well such as if you search for the word "Red" it will also return words like "Cleared" because "Cleared"  has the letters "red" in it.  To get only complete words returned, use "Contains Words".  Unfortunately none of Lightroom's text search routines give the expected results all the time, and Adobe, now that it has gone to a subscription business model, does not seem to feel any need to do anything about the database capabilities of Lightroom.  That is pleasing customers is no longer their highest priority.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

Yeah, we shouldn't have to hunt around for terms to include as text or have to design stuff like collection names for easy text searching. Lr should give us drop-down menus with the actual items, whether it be collections, cameras, lenses, etc. But we've nagged about this forever. And I would love to be able to save filters as a smart collection as opposed to a filter.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

You can usually work around the lack of the Is operator by using Contains All rather than Contains.  The Contains operator matches if the field contains any of the words (e.g. "Hawaii" or "1998"), whereas the Contains All operator matches only if the field contains all of the words (e.g. "Hawaii" and "1998").   

There are common use cases where Contains All isn't sufficient, of course.  And we all agree that LR's text-matching operators are ill-conceived.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 03, 2017 Apr 03, 2017

Copy link to clipboard

Copied

No. I meant 'bug'
Rikk Flohr - Customer Advocacy: Adobe Photography Products

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines