# Filtering multiple keywords



## Jean-JacquesSuter (Aug 26, 2021)

I found nowere (most probably not looking well enough) in the book how to filter multiple keyowrds in Lightroom Cloud.
How can I add search for pictures of 2 poeple that are in the same picture (so only the picutres were they both are)
or the pictures with LR has recognized, plus the Keyword Tag I added manualy when LR did not detect a face (additional in this case)


----------



## johnbeardy (Aug 26, 2021)

I think the easiest way is with two columns showing keywords, so here I filter first on Garry Kasparov, and then the second keyword column filters for members of my family who are in shots tagged with Kasparov.

You can also use a smart collection - matches all - then 2 lines with keyword criteria.


----------



## Johan Elzenga (Aug 26, 2021)

I think the question is about Lightroom desktop, not Lightroom Classic. Lightroom desktop can search for keywords, but I believe the search is always Keyword1 *or* Keyword2, not Keyword1 *and* Keyword2. Or is it about Lightroom Classic after all? “Lightroom CC - cloud based” doesn’t really exist.


----------



## Jim Wilde (Aug 26, 2021)

I think it's the other way round, i.e. it's an "and" search, i.e. enter the name of Person A into the search bar, then add Person B to the search bar, and the result should be only the photos that contain both Person A *and* Person B, which is what the OP wanted.


----------



## Jean-JacquesSuter (Aug 26, 2021)

It is about the New Lightroom that is only in the cloud, I thought it was called Lightroom Cloud.
I tried to write 'and', but the system does not allow it in beteween 2 names ...


----------



## Jim Wilde (Aug 26, 2021)

It's called Lightroom Desktop. 

Click on App Photos, then click in the search bar and type the name of the first person, press enter (that will initially filter the library to show all the images contained the first person. Click again in the search bar adjacent to the first name and type the name of the second person. That should filter the current selection down to those images which also contain the second person. No need to type "and" anywhere, just make sure you have both names entered in the search bar.


----------



## Jean-JacquesSuter (Aug 26, 2021)

anyway to get 'or. ?
do you happen to know what to do when the system does not recognize that their is a face ?
tx


----------



## Johan Elzenga (Aug 26, 2021)

Jim Wilde said:


> I think it's the other way round, i.e. it's an "and" search, i.e. enter the name of Person A into the search bar, then add Person B to the search bar, and the result should be only the photos that contain both Person A *and* Person B, which is what the OP wanted.


I typed this on my iPad, so I couldn’t test in in Lightroom desktop, but I could in Lightroom for iPad. It’s a bit confusing. If I search for keywords that I applied myself, then the search seems to be an “or” search. But if I search for the same words as auto-tagged words, then the search is “and”…

Here’s when I search for the myself-applied keywords (as shown by the tag icon) “Elephant” and “Impala”. As you can see, there are mainly photos of only elephants, no impalas in the same shot. That means it must be an “or” search.



Next I do the same search again, but this time I select the words with a magnifier icon in front of them. AFAIK, these are auto-tagged keywords, so keywords not applied by me, but by Sensei. This time Lightroom does not find any photos, so apparently it now searches for photos were it detected elephants as well as impalas and found none…


----------



## Jim Wilde (Aug 26, 2021)

Yes, now I can see both types of search being done (in both Desktop and Mobile), depending on the specific search criteria. 

It seems that if both (or all) the search terms are selected from the keyword section of the drop-down list of possible terms, then that produces an "OR" search. However, when one (or more) of the search terms are selected from any of the non-keyword terms or no selection is made (i.e. the search term is typed into the search box and entered without making a specific selection from the list), that produces an "AND" search. That to me is somewhat illogical, so I'm wondering if there's a bug in there somewhere.

Using that "free-form" search also does more than search any auto-tagged keywords, I'm pretty sure it searches everything: keywords, titles, captions, location.


----------



## tspear (Aug 31, 2021)

@Johan Elzenga

I had a better test case; using photos from a family reunion; I did the search in an album and also in all photos.  So unfortunately I am not going to show screen grabs.
However, it is always an "and" in the search.  I have also found that Sensi can also cause a surprise. For example, I added a keyword "smile" and added it to a picture of a very unhappy toddler.  Using the filter bar to search for the specific keyword "smile" resulted in the one image. If I type "smile" in the search bar, not only do I get that one result, I also get all images that Sensi found with a person smiling.  The criteria difference on search is not very intuitive, or for that matter any good really; same for the display in the results.


----------



## Johan Elzenga (Aug 31, 2021)

tspear said:


> However, it is always an "and" in the search.


It’s usually an ‘and’ search, but not always. My screenshots clearly show this. Also read Jim’s comments, because he did a little more testing and found which conditions make Lightroom use ‘or’ rather than ‘and’. If depends on how you select the keywords to search.


----------



## Jim Wilde (Aug 31, 2021)

Johan Elzenga said:


> It’s usually an ‘and’ search, but not always. My screenshots clearly show this. Also read Jim’s comments, because he did a little more testing and found which conditions make Lightroom use ‘or’ rather than ‘and’. If depends on how you select the keywords to search.


Following some feedback to a request for clarification that Johan made (as a result of this discussion) I've been doing a bit more testing today. Tim said it's "not very intuitive", and that's probably an understatement, and as Johan says it depends on how you select the keywords to search.

When the user enters a term in the search bar, they are presented with a list of possible matching terms. Those terms could include specific "facets", such as keywords, location, people, camera, each of which would be included in their own specific section in the drop-down list. Below that would be the more general items which could include the specific search term (e.g. title, caption), and these will have the search "magnifying glass" icon in front of them. At this point the user can choose one of the specific search items from the list, such as a keyword, or choose one of the items with the magnifying glass icon, or can simply hit enter without making a selection. Hitting enter would initiate the widest possible search of all metadata plus any hidden auto-tags. 

This is where it gets complicated, though it's perhaps easier to remember that entering multiple terms in the search bar will always result in an "and" search, *except when choosing two or more of the same specific search facet (keyword, camera, location, person) as this will result in an "or" search.* To be clear, if I select two different keywords in the search bar, the grid will show me all images that contain either Keyword 1 OR Keyword 2. If I select a keyword and a person, that would be an AND search, i.e. I'll get any images which contain the specific keyword AND also contain the selected person. And they can be compounded, for example if I do a search for "lancaster" I'll see various options in the search list, and if I choose the keyword "Avro Lancaster" the result would be 255 images containing that keyword. Then I add "spitfire" in the search box and select keyword "Supermarine Spitfire" from the list, which results in the grid expanding to 872 images (i.e. the sum of the lancaster and spitfire images). If I then wanted to narrow that search down to any pictures of a lancaster OR spitfire taken at Shoreham Airport, adding "shoreham" to the search bar would give me various options: one would be a *keyword*, another would be a *location*. If I selected the *keyword*, the grid expands to 1418 as ALL the images taken at Shoreham (not just Lancaster and Spitfire images) have been ADDED to the search result. But if I used the *location* option for "Shoreham Airport" the search result reduces to 29 images, i.e. the result is any image which contains either a Lancaster OR or Spitfire AND was taken at the Shoreham Airport location.

So, not very intuitive, though it does seem that search has a little more flexibility than I originally thought. However, there's plenty of scope for further improvement. And a "not" search operand is definitely needed.


----------



## tspear (Sep 1, 2021)

@Jim Wilde

Great research; I never considered the multiple facets in a test.

@Victoria Bampton

You should add the above to your "Edit like a pro" book, When I looked at the search section; you did not have this aspect covered.


----------



## MarkNicholas (Sep 1, 2021)

i did a little checking myself in LR desktop.

I searched for a word by typing in the search box and it returned a number of results. Cleared it and repeated and it returned a slightly different number of results. I did this several times and a different result each time. I then did a compare with the photos that were being returned in LR and those in LRC and it seems that LR found more photos because it was returning photos that did not have that particular keyword.

The reason appears to be as follows. The word I was searching for was "Teddy" the name of my grandson. In LRC it only returned photos that had the "Teddy" keyword. In LR desktop the additional photos that were returned were photos that had an actual teddy bear in the photo (or similar). These photos did not have any keywords at all ! 

Is this the Sensi doing its thing ? Very clever but also very confusing. Is there a way to turn it on and off ?


----------



## Jim Wilde (Sep 1, 2021)

MarkNicholas said:


> Is this the Sensi doing its thing ? Very clever but also very confusing. Is there a way to turn it on and off ?



Probably. How did you enter the Teddy search term? If you typed it into the search bar, then hit enter without selecting from one of the choices in the drop-down list which should have appeared as soon as you started typing (and which should refine the more you type), then LrD will search the entire source for all possible matches.....that would include any reference in existing metadata (such as keywords) as well as any Sensei auto-tags. 

If you want to restrict the search to avoid the Sensei auto-tags, select the appropriate entry from the drop-down list, e.g. the keyword "Teddy". If you select an entry such as "teddy" which has the search magnifying glass in front, that's almost certainly going to be the full search of metadata and sensei auto-tags.


----------



## MarkNicholas (Sep 4, 2021)

Jim Wilde said:


> Probably. How did you enter the Teddy search term? If you typed it into the search bar, then hit enter without selecting from one of the choices in the drop-down list which should have appeared as soon as you started typing (and which should refine the more you type), then LrD will search the entire source for all possible matches.....that would include any reference in existing metadata (such as keywords) as well as any Sensei auto-tags.
> 
> If you want to restrict the search to avoid the Sensei auto-tags, select the appropriate entry from the drop-down list, e.g. the keyword "Teddy". If you select an entry such as "teddy" which has the search magnifying glass in front, that's almost certainly going to be the full search of metadata and sensei auto-tags.


Yes this was when I used the search bar without selecting from the drop down list. If I select only keywords then it seems to work ok.


----------

