Any Filter Lightroom Plugin


Any Filter provides search capabilities similar to Smart Collections but with many more searchable photo fields (criteria) and many more operators for comparing fields. Search over any photo field or setting that’s visible in Lightroom and many that aren’t, including IPTC Extension, GPS location, library properties, develop settings, and plugin fields (340 fields in all). Additional operators include exact text match, matching regular expressions, testing empty fields, distinguishing explicit from implicit ancestor keywords, treating text fields as numeric, and including other saved Any Filters and Smart Collections.

Example Any Filters include:

  • Has Virtual Copies

  • Top of stack, without keywords

  • Cropped megapixels less than 1.5 MP

  • Aspect ratio (width / height) greater than 3

  • Captured Christmas day (any year)

  • Keywords include ancestor keywords

  • Exact match of explicit keywords (not parents)

  • Exactly one person in the keywords

  • Exact text match of caption

  • Captions starting with number greater than 500

  • Within 10 kilometers of Stanford University (GPS)

  • Locations Shown in Palo Alto, CA (IPTC Extension)

  • Subject Distance less than 1 meter

  • Metering Mode is multi spot

  • Spot Removal applied

  • Develop exposure greater than 1

  • Raw camera profile not Camera Standard

 

Any Filter also provides a command that lets you quickly filter by dates and date ranges by typing the dates, rather than fussing with the Library Filter bar:

Try it for free for 30 days. Buy a license at a price you name.

Download and Install

  1. Download anyfilter.1.20.zip.

  2. If you're upgrading from a previous version of Any Filter, exit Lightroom and replace the existing anyfilter.lrplugin folder with the new one extracted from the downloaded .zip. Restart Lightroom and you're done.

    If you're upgrading from version 1.6 or earlier: Before replacing the anyfilter.lrplugin folder with the new one, copy the file anyfilters.txt out of the folder. After replacing the folder with the new version, copy that file back into the folder. This will preserve your saved Any Filters. After version 1.6, this is no longer necessary.

  3. If this is a new installation, extract the folder anyfilter.lrplugin from the downloaded .zip and move it to a location of your choice.

  4. In Lightroom, do File > Plug-in Manager.

  5. Click Add, browse and select the anyfilter.lrplugin folder, and click OK (Windows) or Add Plug-in (Mac OS).

  6. Lightroom will present a scary-looking, cryptic message: "Your catalog must be updated before it can be used with the following plugin". Click Update Catalog. This warning is harmless and is shown for plugins that store their own data in the catalog (which is many of them)—but don't worry, Lightroom ensures such plugins can't corrupt your catalog.

The free trial is for 30 days—after that, you’ll need to buy a license.

Buy a License
  1. Buy a license at a price you think is fair: Add to Cart
    The license includes unlimited upgrades. Make sure you're satisfied with the free trial before buying.

  2. Copy the license key from the confirmation page or confirmation email.

  3. Do Library > Plugin-Extras > Any Filter > Search.

  4. Click Buy.

  5. Paste the key into the License key box and click OK.

Using Any Filter > Search

Creating an Any Filter is very similar to creating a Smart Collection. If you’re not familiar with Smart Collections, I recommend you read the Adobe Help before trying to use Any Filter. Any Filter includes all the criteria of Smart Collections and adds many more.

Any Filter commands are available under Library > Plug-in Extras > Any Filter menu as well as File > Plug-in Extras > Any Filter. Their location under File allows them to be used in any module, while the Library menu is retained for users accustomed to earlier versions of Any Filter.

Applying a Saved Any Filter

When you apply a saved Any Filter, all the images in the catalog are filtered to show just the ones matching the Any Filter. Unlike Smart Collections, the results aren’t automatically updated as you change images – reapply the filter to see new results.

To apply a saved Any Filter:

  1. Do Library > Plug-in Extras > Any Filter > Search (keyboard shortcut ALT+L S S on Windows).

  2. Click Any Filters in the upper left.

  3. Select one of the saved Any Filters on the right.

  4. To search only visible photos (showing in Grid mode or in the filmstrip), rather than the entire catalog, check Visible photos only.

  5. Click Apply, or double-click the selected Any Filter.

  6. The Library Filter bar will be updated to filter all the images in your catalog that match the criteria of the selected Any Filter.

Each time you apply an Any Filter, the resulting photos are saved in a new collection under the collection set Any Filter Results. Any Filter retains the most recent 8 results. If you want to retain one of the collections permanently, rename it or move it to another collection set. You can disable saving of results by unchecking the option Save results as a collection.

Applying a Collection or Smart Collection

As a convenience, you can filter using an existing collection or Smart Collection rather than a saved Any Filter. This lets you view the contents of a collection with all the contained stacks collapsed (Lightroom doesn’t show stacking for collections). It also lets you snapshot the contents of a Smart Collection, which is handy when you don’t want the set of images matched by the Smart Collection to automatically update as you modify them.  And it lets you intersect the results of a smart collection or collection with a folder, functionality that was removed from Lightroom 4.

  1. Do Library > Plug-in Extras > Any Filter > Search (keyboard shortcut ALT+L S S on Windows).

  2. Click Collections in the upper left.

  3. Select one of the collections or Smart Collections on the right.

  4. Click Apply, or double-click the selected collection.

  5. The Library Filter bar will be updated to filter just the images in the collection.

Creating and Editing an Any Filter

Creating and editing an Any Filter is similar to creating a Smart Collection:

  1. Do Library > Plug-in Extras > Any Filter > Search (keyboard shortcut ALT+L S S on Windows).

  2. Click an existing Any Filter or click New.

  3. Enter a name for the Any Filter.

  4. The current criteria are displayed, one per line. To edit a criterion, click on it and then use the drop-downs and edit fields to change the criterion:

  5. To add a new criterion after the currently selected one, click the "+" button; to delete a criterion, click the "-" button.

Searching Plug-in Metadata

Any Filter can search custom metadata fields defined by plug-ins. To tell Any Filter to search a plug-in’s fields:

  1. Click Plug-in Metadata.

  2. Click Add Plug-in.

  3. Browse to folder containing the plug-in and click OK.

When editing an Any Filter, the plug-in will now be listed in the left-most drop-down menu along with the other categories of criteria (Library, Date/Time, Description, etc.).

Plug-ins that store numbers in their metadata fields store the numbers as texts, but you can use Any Filter’s numeric operators (< number, = number, etc.) to treat those fields as numeric.

Any Filter Criteria

Any Filter provides all of the searchable photo fields (criteria) and operators of Smart Collections and many more, including IPTC Extension, GPS location, library properties, develop settings, and plugin fields. The complete list is available here. Additional operators include exact text match, matching regular expressions, testing empty fields, distinguishing explicit from implicit ancestor keywords, treating text fields as numeric, and including other saved Any Filters and Smart Collections.

Matches Patterns

The matches and doesn't match operators test whether a field's value matches a pattern. The pattern syntax is documented here.

Fields with Multiple Values

Any Filter provides more flexibility with fields like Collections and Keywords that contain multiple values. As with Smart Collections, you can define a criterion Keywords = John that matches a photo if at least one of its keywords is equal to John. But you can also define that criterion more explicitly as:

Keywords some items
    Keyword = John

which is true if at least one of the keywords is equal to John. Similarly, the criterion Keywords != John matches if none of the keywords matches John; this is equivalent to:

Keywords no items
    Keyword = John

Using this explicit testing of individual items, you can write more complicated criteria:

Keywords all items
    Some of
        Keyword = John
        Keyword = Peter

This matches a photo if all of its keywords are either John or Peter. See the predefined Any Filter Exactly one person in the keywords for how to write a more complicated filter that matches photos that contain exactly one person (a subkeyword of People) and no others.

Some of the IPTC Extension fields are actually sequences of multiple subfields. For example, the Locations Shown field can contain one or more locations, each of which has a City, Country Code, Country, Province/State, Sublocation, and World Region. To match photos showing the location Palo Alto, CA:

Locations Shown some items
    All of
        City = Palo Alto
        State/Province = CA

For any field with multiple values, you can test the number of values using the number of operators. For example, to match photos with no more than 2 explicit keywords assigned:

Explicit Keywords number of <= 2

Explicit Keywords

Lightroom’s Smart Collections and filtering define the Keywords criterion to mean any keywords that have been explicitly applied to the photo, the corresponding ancestor keywords, and any synonyms of those keywords. For example, if the keyword People > Family > John has been applied to a photo, then the Smart Collection Keywords contains People will match that photo.

With Any Filter’s Explicit Keywords criterion, you can match the explicitly applied keywords only, ignoring synonyms and the implicit ancestor keywords. You can use the subkeyword of operator to test if an explicit keyword is a subkeyword or identical to another keyword. For example, the criterion Explicit Keywords subkeyword of People is the same as Keywords = People. See the predefined Any Filter Exactly one person in the keywords for an example.

The criterion Explicit Keywords contains ancestors has a unique purpose, to identify a photo that has both a keyword and its ancestor explicitly applied, for example, People and People > Family > John. This can be handy when you’re adding more levels of detail to your keyword hierarchy and want to find photos where you've accidentally applied both a keyword and its ancestor.

Any Filter Speed

Some Any Filters match photos as fast as Smart Collections, some match as slow as 150 photos/second (if they access develop settings), and most will match at least 1500 photos/second,  often many times faster. Any Filter is limited by the speed at which Lightroom supplies plug-ins with photos’ metadata.

Wherever possible, Any Filter uses Smart Collections internally to speed up matching. For example, to implement Keywords = John, Any Filter first executes Keywords contains John using Smart Collections (which is very fast) and then further filters the resulting photos to those whose keywords exactly match John.

If your Any Filter is matching too slowly, consider adding Smart Collection criteria that will help Any Filter quickly narrow down the set of photos. For example, if you know that the desired photos were captured in the last several months, add a Date/Time Original (Capture) criterion.

Using Any Filter > By Date

The By Date command lets you quickly filter by dates and date ranges by typing the dates, rather than fussing with the Library Filter bar. When prompted for a date, you can enter the full year/month/day, year/month, or just a year.

For example, to find all photos in 2012, select Date and enter 2012. To find all photos from 1993 to 1999, select Date Range and enter the years 1993 and 1999.

The option Clear current filter clears all previous filter conditions; deselecting that option causes a Date column to be added to the current filter.

Keyboard Shortcuts

Windows: You can use the standard menu keystrokes to invoke Any Filter commands. For example, ALT+L opens the Library menu, U opens the Plug-in Extras submenu, and S invokes the Any Filter Search command.

To reassign a different final keystroke to an Any Filter menu item, edit the file Info.lua in the plugin folder. Move the & in front of the desired letter in the menu command’s name, changing the name itself if necessary.

Mac OS: You can use the standard mechanism for assigning application shortcuts to plugin menu commands. In System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts, select Adobe Lightroom. Click "+" to add a new shortcut, in Menu Title type the name of the menu command preceded by three spaces. For example, if you wanted to assign a key to the Any Filter > Search command, type "<space><space><space>Search". In Keyboard Shortcut type the desired key or key combination.

Support

Please send problems, bugs, suggestions, and feedback to

I’ll gladly provide free licenses in exchange for reports of new, reproducible bugs.

If Any Filter crashes with an error or produces surprising results, please check the Debug option and re-apply the filter. In the plug-in folder anyfilter.lrplugin, find the files debug.log and anyfilters.txt and email them to me. If you don’t remember the location of the folder, do File > Plug-in Manager, select Any Filter, and look at Path. On Mac OS, the folder won’t normally open in the Finder – right-click it and select Show Package Contents.

Known limitations and issues:

  • Any Filter requires Lightroom 3 or later – it relies on features missing from earlier versions.

  • Any Filter can sometimes match photos as slow as 270 photos/second (the develop settings, in particular). See Any Filter Speed for tips on speeding up filters.

  • If you're confused as to why a photo does or does not match an Any Filter, select the Log photo metadata option before clicking Apply. This will record the relevant metadata fields for each photo into the file metadata.log in the plugin folder, and you can then examine the values of those fields.

  • The Any Filter: Search column in the Library Filter Bar Metadata browser is not intended to be used directly by users. Rather, Any Filter uses it to display the results of applying a filter. Ideally, it would be hidden from users, but Lightroom doesn't make that possible.

  • If you try to use criteria not supported by your version of Lightroom, you'll get an inelegant plugin error. For example, if you try to use the Lightroom 5 criterion Has Smart Preview in Lightroom 4 or earlier, you'll get an error.

  • Any Filter tries to work around a number of bugs in Lightroom’s Smart Collections and filtering, which is creaky and needs significant improvement (one of my motivations for making Any Filter). I fully expect that there are undiscovered Lightroom bugs that Any Filter’s users will trip over. If you suspect such a bug, see above for how to report them.

Version History

1.4
  • Initial release
1.5
  • Fixed Lens Profile Name to be a text field, not a number
1.6
  • Added number of operators for fields with multiple values
1.7
  • Added By Date command.
  • The Distance From, Latitude, and Longitude criteria now accept either form of coordinate, -118.5469 or 118° 32' 49" W.
  • Saved Any Filters are now stored in the Lightroom preferences folder, making it easier to upgrade to new versions of Any Filter.
  • Distance From, Latitude, and Longitude criteria execute much faster.
1.8
  • Fixed incompatibility with user names containing non-ASCII characters (caused by bug in Lightroom SDK).
1.9
  • Allowed .lrplugin directories to be selected by the Plug-in Metadata > Add Plug-in command on Mac.
1.10
  • Added new fields for LR 4, including Process Version 2012 develop settings.
  • Any Filter commands now appear on both the File > Plug-in Extras and Library > Plug-in Extras menus, so they can be used in all modules, not just the Library.
  • Added Visible photos only option for searching just the visible photos.
  • Added the field Saved Locations for searching photos located within a saved map location.
  • Provided a documentation link above for matches patterns.
  • The Scene field is renamed to IPTC Scene Code.
  • The Location field is renamed to Sublocation and mapped to the correct metadata field (no longer to "scene").
  • Now ignores errors from corrupted catalog entries.
  • Fixed a bug with Apply of collections.
  • More gracefully handles syntactically ill-formed captures in matches regular expressions.
  • In LR 4, uses the SDK's new backoff feature for handling updates to the catalog.
1.11
  • New field Metadata Status (not available in Lightroom 3).
  • New field Crop Constrain To Warp.
  • Fixed "assertion failed" when you search with Visible photos only and no photos are visible.
  • Fixed error when Visible photos Only and Debug are both selected.
  • Correctly handles Subject Distance and Video Frame Rate in countries in which the decimal mark is comma rather than dot.
1.12
  • New field Collection Sets, similar to Collections.
  • New field Associated File Types tests whether there are associated files with the same base name but different extensions (for example, xmp).
1.13
  • New fields Incremental Temperature and Incremental Tint, representing Temp and Tint for JPEGs in the Develop module.
  • Fixed typo in field Incremental Lights.
1.14
  • New fields Temperature and Tint, representing Temp and Tint for raw files in the Develop module.
1.15
  • Fixed Aspect Ratio when used in some compound queries.
1.16
This version includes lots of changes to better support Lightroom 5, along with other miscellaneous changes:
  • Added 20 new fields provided by Lightroom 5: Color Noise Reduction Smoothness, Enable Circular Gradient Based Corrections, Circular Gradient Based Corrections, Perspective Aspect, Perspective Upright, Lens Profile Filename, Crop Constrain Aspect Ratio, Has Smart Preview, Smart Preview Path, Smart Preview Size, Is DNG With Fast Load Data, Is Proof, Long Edge, Short Edge, Cropped Long Edge, Cropped Short Edge, Cropped Megapixels, Bits Per Channel, Source Color Mode, Source Color Profile.
  • Significantly speeded up these fields using new features in Lightroom 5: Width, Height, Cropped Width, Cropped Height, Megapixels, Cropped Megapixels.
  • The fields Megapixels and Cropped Megapixels are rounded to the nearest tenth, to conform with Lightroom 5 smart collections.
  • Added is unknown operator for dates/times, making it easier to test for images missing the metadata field Date Time Original.
  • Made the user interface a little easier to read on Windows, working around a Lightroom 5 bug that Adobe is unlikely to fix anytime soon.
  • Made Any Filter robust in the face of invalid dates/times stored in catalogs converted from early versions of Lightroom. In particular, the "month" and "day in month" date operators won't fail with such catalogs.
  • Changed the option Log matching metadata to Log photo metadata, which logs metadata of all the photos, not just those matching the searching criteria.
1.17
  • New option Save results as a collection saves Any Filter results in collections under the collection set Any Filter Results.
  • Worked around many bugs in Lightroom smart collections and metadata, most of which were obscure edge cases that most users would never encounter.
1.18
  • New field IPTC Date Created.
1.19
  • Worked around Lightroom SDK bugs with the fields Tone Curve Point Adjustments, Filename, and Copy Name.
  • Fixed a bug with the field Spot Removal that caused click-and-drag clones from being recognized.
1.20
  • Keywords criterion now searches keyword synonyms too.
  • Clear current filter option lets you keep current filter settings.
  • New fields Metadata Date, Location Is Private, Audio Channel Type, Audio Sample Rate, Audio Sample Type, Track Number, Video Alpha Mode
  • Fixed bug in Copyright Status.
Copyright 2011-14 John R. Ellis