Advanced keyword filtering?

Status
Not open for further replies.

thany

Member
Joined
Sep 16, 2013
Messages
63
Location
Netherlands
Lightroom Experience
Intermediate
Lightroom Version
I'm looking for a more advanced filter for keywords. Currently, it seems, the only way to filter by keywords is by OR'ing them together, so to speak.

I have had some use-cases, which I already worked around, where I needed to show only the pictures that don't contain a certain keyword (a NOT filter). The intuitive thing to do is to select all other keywords, which (now obvious to me) doesn't do what I want. I've also come across a scenario where I needed to only show pictures that contain both the two selected keywords, but not one of either (an AND filter instead of OR).

Is this possible? Or should I be approaching such scenarios differently?
 
Instead of the filter bar, you might consider Smart collections to achieve the same purpose. Each can be AND/OR'd is separate criteria. Very complex queries can be generated in this way. Also consider the verb choices "Contains", Does not Contain" and "Contains All" . By placing the "!" in front of a keyword is the same as interjecting "NOT" in front of the keyword As in a keyword phrase {bird dog !cat} returning any, birds with or without dogs but not any birds or dogs with the keyword cats present.
 
Never used Smart Collections actually (is that bad?) but now that I'm looking at how to create them, their filtering mechanism is certainly more powerful than the regular metadata filters.

It's a nice idea certainly. But just one thing: I need it to work on a certain folder (and possibly subfolders), not on my entire catalog. As they are now, I'm really missing my folder structure that I'm used to.
Now of course, I could set a certain folder in the Smart collection (and why it's not possible to *select* a folder... Boy, who knows). Sure, that does work. But it feels too "permanent", as I'll only need these collections to quickly filter out certain pictures from a folder that I happen to be working in. Is it possible to apply a smart collection to "the folder I'm currently viewing", so to speak?
 
Hi,

Another method that is more Ad hoc than setting up smart filters is to try the Any Filter plug-in by John R. Ellis. It's a bit quirky but he gives you access to search anything that is in the catalog or in the image files.

-louie
 
In Smart Collections Under "Source", "Folder" is one of the criteria choices. So you should be able to construct the precise query that you need with smart collections.
 
In Smart Collections Under "Source", "Folder" is one of the criteria choices. So you should be able to construct the precise query that you need with smart collections.
Yes, I know. First of all, what do I type there? The whole path to a folder? In a "folder" filter, I'd expect to be able to select one or more folders. Treating it like a free text field seems silly to me (lazy even).
Secondly, how do I make it apply to the *current* folder, whichever that is?
Another method that is more Ad hoc than setting up smart filters is to try the Any Filter plug-in by John R. Ellis. It's a bit quirky but he gives you access to search anything that is in the catalog or in the image files.
Thanks, I'll see if that'll fit my needs.
 
You construct the query for a specific folder by searching for something unique in that folder name If there is nothing that uniquely defines one folder, then combine that with other criteria to retreive only images from that one folder. e.g:
{folder}{contains}{Zion}
or
{folder}{contains}{10-31}
{keyword}{contains}{Zion}

Since I use a date named folder scheme, the latter would work for me for images that I shot yesterday.
 
It's a shame there is no easy way to make "intersected" searches/filters in LR.

I would like to be able to select a folder, and then "add" an existing smart collection rule to that folder, perhaps by Ctrl-clicking or something. And then perhaps add a third intersecting filter by Ctrl-clicking a keyword. Or something like that.
 
Hi Robert,
The problem is that LR won't allow existing Smart Collections as a criterium, only existing "dumb" collections. You can of course create nested conditions by holding down the Option (Mac) or Control (Win) key when clicking the + sign inside the Edit Smart Collection dialog. They can be set as intersection, just like the Smart Collection itself.
 
But just one thing: I need it to work on a certain folder (and possibly subfolders), not on my entire catalog. As they are now, I'm really missing my folder structure that I'm used to.

You can use Clee's {bird dog !cat} phrase in the Text Filter bar, as well as in smart Collections. Text filters would be confined to your current folder view by default.
 
Never used Smart Collections actually (is that bad?) [...] Sure, that does work. But it feels too "permanent", as I'll only need these collections to quickly filter out certain pictures from a folder that I happen to be working in. Is it possible to apply a smart collection to "the folder I'm currently viewing", so to speak?
Hi thany,
Member johnbeardy has a solution that may work for you:
- First you create a collection (not a smart collection!) called "current work" or however you wish to call it.
- Then when you start working on a new set of images, you simply drag all of these images to this collection.
- From now on, your images are in a collection that can be referenced from within a smart collection. In the smart collection rules, you can simply select "Source" -> "Collection", "contains" and then "current work". You can make it rock solid by making the folder name more unique (like adding periods or numbers like John did).
- You can build numerous smart collections upon this current work collection.
- All you need to do when finished is remove all images from your current work collection to make room for a new series.
 
Hi Robert,
The problem is that LR won't allow existing Smart Collections as a criterium, only existing "dumb" collections. You can of course create nested conditions by holding down the Option (Mac) or Control (Win) key when clicking the + sign inside the Edit Smart Collection dialog. They can be set as intersection, just like the Smart Collection itself.

I know. I'm not talking about criterias inside smart collections. I would like to combine a selected folder in the folder panel, with a smart collection from the collection panel, with a keyword from the keyword panel and so on.

As it is today, if I select a folder in the folder panel, I will see all photos in that folder. If I then click on a smart collection, I will "loose" the folder view and instead see the contents of the smart collection. Or if I click a keyword in the keyword panel I will see all photos in my entire catalog that contain that keyword. I would like to be able to combine these things in a simple way.
 
Yes, I understood what you wanted to do. And as much as I would like to have such functionalities, at the same time I know there is nothing in my current work flow that I can't achieve with the current smart collections. Maybe we can issue a functionality request at Adobe...
 
I know. I'm not talking about criterias inside smart collections. I would like to combine a selected folder in the folder panel, with a smart collection from the collection panel, with a keyword from the keyword panel and so on...
A Smart collection resolves into a SQL query (a programming language used for retreiving information from a database) What you are asking for is to apply one criteria (select a folder) followed by more criteria (Select some more stuff) followed by another criteria (Select images with a keyword)
The end result is another more complex query. All of which is a Smart Collection which you can construct as quickly using the Smart Collection editor The statement "SELECT an image WHERE the folder is "X" and the keyword is "Y" and the other attributes (that whole bunch of other stuff) are "Z" Is a pseudo language statement of your query. Ultimately LR needs to turn that into a valid SQL statement so that the result can be retrieved from the database.
 
Yes Clee, I understand that. But constructing a new smart collection for every search you may want to do is not neccessarily easy or quick. It would be much easier and quicker to be able to combine the various search/filter options already available on screen by just "combine-clicking" in some way. I mean, the various panels are already there, ready for clicking. But maybe it's just me who see the benefit.
 
No Robert, I can see how your idea could be really powerful. It reminds me of computer programming I did over 30 years ago, where I would create a number of simple procedures that in turn I could call from other higher level procedures. It's about reusing more or less simple elements into more complex structures.

Still this is mainly about code redundancy and not about added functionality, because you won't be able to create Smart Collections that you can't create now. If I understood you correctly, that is.
 
At one point, you could do something like Ctrl Click a folder and a smart collection, and the latter's criteria would be applied. It was flaky, and I'm pretty sure it was a bug that was fixed. It was also horribly geeky and there's a better equivalent in Aperture where you can drag a smart album under a folder.
 
Hi Robert,
The problem is that LR won't allow existing Smart Collections as a criterium, only existing "dumb" collections. You can of course create nested conditions by holding down the Option (Mac) or Control (Win) key when clicking the + sign inside the Edit Smart Collection dialog. They can be set as intersection, just like the Smart Collection itself.
Hold on, that sounds new to me. Does that mean combining OR and AND filters within a smart collection? Because that would actually cover my needs.
So something like this:

( keywords are empty OR caption is empty OR not geotagged ) AND flag is pick AND folder is something

Are you saying that's possible?
 
Yes, but you'd probably need to construct it the other way round, i.e.

Pick Flag is Flagged AND Folder contains FolderName AND (Keywords are Empty OR Caption is Empty OR GPS Data is No Coordinates)

Something like this:

Capture.JPG

Would return all picked images in folder xyx that don't contain either keywords, caption, or GPS data.
 
Hi thany,

Yes, Jim's example shows exactly what you want. You can also filter on collections, but not on smart collections.
 
Not bad. I tried it, and it works very nicely.

I'm still struggling with one more thing. I can't work out how to make a filter for keywords to contain *only* a certain tag. Sure I could make a filter for not containing all the others, but this is fiddle and hard to maintain. Any better solutions?

I now want a smart collection that says "either no keywords at all, or only machine-keywords". I can't work out how to do that. (machine keywords are those with a colon in them)
 
Just to be sure, what do you mean by "machine keywords"? Can you give an example?
 
Keywords contain :

Don't know if that works.

Another method might be to place all "machine-keywords" under a parent keyword. That way you can search for the parent keyword (or the lack of it).
 
Hi Erro,

Never heard of machine keywords that contain ":". But I'm very interested! Nothing comes up on Google. Could you please elaborate, tell me more?
 
Way back up to the top question and to state something you may already know (if so apologies), while filtering on two keywords is an OR, you can put "Keyword" type in two (or more) columns on the metadata filter, then select a keyword in each, and it's an AND.
 
Status
Not open for further replies.
Back
Top