• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

"Export containing keywords"

Status
Not open for further replies.

camner

Active Member
Premium Classic Member
Joined
Sep 28, 2008
Messages
737
Location
Tacoma, WA
Lightroom Experience
Intermediate
Lightroom Version
Classic
Lightroom Version Number
12.0.1
Operating System
  1. macOS 12 Monterey
In my Lightroom set up, when a new keyword is created, the box for "export containing keywords" is checked by default. I never paid this much attention, because I didn't use the export function very frequently, and when I did export, I didn't really care if the containing keywords were exported or not.

Now, part of my workflow involves exporting certain images to be processed by another app, and I want the image that results from that processing to be added to the Lightroom catalog and stacked with the original. That process works just fine, but because all my keywords have the "export containing keywords" box checked, the new image has the containing keywords explicitly assigned to the image, but I don't want this!

1. Is there any way for me to uncheck the "export containing keywords" box for multiple keywords at a time, or would I have to go into every single keyword and uncheck that box?

2. Alternatively, is there a way to specify at the time of a given export that one does not want to have containing keywords exported?

Is there another approach to this that I may be missing?
 
Solution
Very clever! I never would've thought of that.

I am pretty certain that the issue with explicit ancestors (containing keywords) being assigned came about not at random, but from a few times when I did something whose consequences I didn't fully understand. As a result, although I have over 3000 images that are affected, the actual number of distinct keywords that have ancestors explicitly assigned I believe is relatively small. That should make the task more manageable.

Many thanks for your help with this.
Do you have Write Keywords as Lightroom Hierarchy checked in the export dialog? If not, see if that'll do the trick for you.
 
Is there any way for me to uncheck the "export containing keywords" box for multiple keywords at a time, or would I have to go into every single keyword and uncheck that box?
Unfortunately not (at least not without using a database tool to directly modify the catalog database.) It's beena feature request for at least 10 years. Adobe doesn't even provide the API that would allow plugins to do this.

Alternatively, is there a way to specify at the time of a given export that one does not want to have containing keywords exported?
No.
Do you have Write Keywords as Lightroom Hierarchy checked in the export dialog?
Checking that option will avoid the unwanted re-importing of the ancestor keywords. With that option checked, LR writes an additional metadata field XMP:HierarchicalSubject containing the hierarchical form of the keywords (e.g. the keyword Animal > Dog gets written into that field as Animal|Dog). When XMP:HierarchicalSubject is present in an imported photo, LR will read keywords from there, rather than from the industry standard fields (which will contain the ancestor keywords as separate keywords).
 
Thanks to both John and Victoria for their suggestion there's suggestion to check the box for Write Keywords as Lightroom Hierarchy. Unfortunately, that did not work.

The screenshot below shows the keyword panel for a test image with just three keywords. The 2nd and 3rd keywords are part of a hierarchy.
2022-12-04_LR-1.jpg

The second screenshot shows the keyword panel for the exported photo after it was imported (by the settings in the export dialog box) into Lightroom. As one can see, the hierarchy is being displayed.
2022-12-04_LR-2.jpg
(I have no idea how the rhody keyword get there, but that's for another day...)

It took me a while to puzzle this out, but I believe that a good clue into what is going on can be discerned from the screenshot below, which is the keyword panel of the original photo after the exported photo has been imported into Lightroom.
2022-12-04_LR-3.jpg

It seems that what has happened is that when Lightroom imported the exported photo, it created new keywords. And sure enough, if you look at the screenshot below of the keyword list, you can see that Lightroom created two new keyword hierarchies (PLANTS and USA).
2022-12-04_LR-4.jpg

Now, it took me even longer to understand why Lightroom was behaving this way. I think the answer lies in how I set up my keyword hierarchy. I have 6 highest level keywords (see screenshot below).
2022-12-04_LR-5.jpg

All other keywords are descendants of one of these six highest level keywords. Each of these six highest level keywords has the following keyword tag options, while all of the descendant keywords have the first three boxes checked.
2022-12-04_LR-6.jpg

What I think is happening is that when Write Keywords as Lightroom Hierarchy is checked, Lightroom is NOT exporting any of the highest level keywords, because I told it not to. But it IS exporting all of the appropriate descendants. When Lightroom imports the exported image, since the highest level keyword is not included, Lightroom is creating new keywords that are not part of my hierarchy scheme.

I haven't been able to puzzle through what is a good way of handling this situation. One option would be to check the top three boxes of the highest level keywords. I did not do that initially when I created the hierarchy because I couldn't imagine that the highest level keywords would be of interest, since their only purpose is to serve as an organization method. Is there another way I might attack this?
 
Your understanding of what's happening is correct. When you assign the keywords
Code:
2-WHAT > PLANTS > flowers > lilacs
4-WHERE > USA > Washington > Tacoma > Antique Sandwich Company

and all the keywords are marked for export, then LR writes this Adobe-specific field containing the fully qualified keywords:
Code:
[XMP] Hierarchical Subject: 2-WHAT|PLANTS|flowers|lilacs, 4-WHERE|USA|Washington|Tacoma|Antique Sandwich Company

But when you mark 2-WHAT and 4-WHERE to be excluded from export, they are omitted from XMP:HierarchicalSubject:
Code:
[XMP] Hierarchical Subject: PLANTS|flowers|lilacs, USA|Washington|Tacoma|Antique Sandwich Company

So when you reimport that exported photo, you get PLANTS and USA as new top-level keywords.

The only solution I can think of is to mark the top-level keywords for export.
 
I have no idea how the rhody keyword get there, but that's for another day...
Very likely "rhody" has been entered as a synonym for "lilacs". Synonyms get exported as top-level keywords unless you uncheck Export Synonyms.
 
After giving it some thought, I think I have a workaround that will allow me to accomplish what I wish to do. It does add a bit to the workflow, and I have to be careful to make sure I do it correctly.
  1. Export using Friedl's Metadata Wrangler plugin to export without including any keywords, and specify that after processing, the export files will be re-imported into Lightroom and stacked with the originals.
  2. Use John Beardsworth's Syncomatic plugin to sync the keywords from the original files to the exported and reimported files.
Now, in terms of work flow simplicity, using Edit in… would be better than Export, but for reasons I do not understand, when using Edit in… my 2020 27" iMac bogs down completely for a long time while the process is completing. I find this puzzling, because it seems to me that Edit in… is a form of export and re-import, but Lightroom behaves very differently.
 
That workflow sounds right.

There's been a longstanding feature request to handle the export/reimport of keywords better:
https://community.adobe.com/t5/ligh...d-reimporting-keyword-synonyms/idi-p/12249145

but as with most things Library, I don't think Adobe will ever consider it now.

when using Edit in… my 2020 27" iMac bogs down completely for a long time while the process is completing. I find this puzzling, because it seems to me that Edit in… is a form of export and re-import, but Lightroom behaves very differently.
Not surprising -- I don't think Adobe implemented Edit In with the idea that it would invoked on more than a few photos at a time. (Though there's a stream of bug reports in the Adobe forums about Edit In failing on larger batches.)
 
Is there a way to filter on/search for photos that have both a keyword and one or more containing keywords explicitly assigned?
 
Is there a way to filter on/search for photos that have both a keyword and one or more containing keywords explicitly assigned?

As it happens, Any Filter has a special operator just for that:
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.
 
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.
So it does! There are so many things your plug-ins can do that is a challenge to understand them all!

Now that I have found for 3092 photos that have explicit containing keywords assigned, the challenge becomes how to delete those containing keywords without having to go through each of the 3092 images in turn.
 
Now that I have found for 3092 photos that have explicit containing keywords assigned, the challenge becomes how to delete those containing keywords without having to go through each of the 3092 images in turn.
You could speed up the manual process somewhat:

1. Run Any Filter with the option Save Results As A Collection; select the most recent result collection under the collection set Any Filter Results.

2. Open two keyword columns in the Library Filter bar and change them from Hierarchical to Flat:
1670973309767.png


3. Select the first photo and look in the Keywording panel to determine a likely pair of ancestor/descendant keywords.

4. Select the ancestor keyword in the left Keyword column and the descendant keyword in the right Keyword column.

5. Select all the displayed photos and remove the ancestor keyword from the Keywording box.

6. Periodically rerun Any Filter.
 

Attachments

  • 1670972868032.png
    1670972868032.png
    224.6 KB · Views: 57
Very clever! I never would've thought of that.

I am pretty certain that the issue with explicit ancestors (containing keywords) being assigned came about not at random, but from a few times when I did something whose consequences I didn't fully understand. As a result, although I have over 3000 images that are affected, the actual number of distinct keywords that have ancestors explicitly assigned I believe is relatively small. That should make the task more manageable.

Many thanks for your help with this.
 
Solution
In about an hour, I got it down from over 3000 images to about 1200. Not bad return on time investment.
 
Thanks to both John and Victoria for their suggestion there's suggestion to check the box for Write Keywords as Lightroom Hierarchy. Unfortunately, that did not work.

The screenshot below shows the keyword panel for a test image with just three keywords. The 2nd and 3rd keywords are part of a hierarchy.
View attachment 19855

The second screenshot shows the keyword panel for the exported photo after it was imported (by the settings in the export dialog box) into Lightroom. As one can see, the hierarchy is being displayed.
View attachment 19860
(I have no idea how the rhody keyword get there, but that's for another day...)

It took me a while to puzzle this out, but I believe that a good clue into what is going on can be discerned from the screenshot below, which is the keyword panel of the original photo after the exported photo has been imported into Lightroom.
View attachment 19859

It seems that what has happened is that when Lightroom imported the exported photo, it created new keywords. And sure enough, if you look at the screenshot below of the keyword list, you can see that Lightroom created two new keyword hierarchies (PLANTS and USA).
View attachment 19858

Now, it took me even longer to understand why Lightroom was behaving this way. I think the answer lies in how I set up my keyword hierarchy. I have 6 highest level keywords (see screenshot below).
View attachment 19857

All other keywords are descendants of one of these six highest level keywords. Each of these six highest level keywords has the following keyword tag options, while all of the descendant keywords have the first three boxes checked.
View attachment 19856

What I think is happening is that when Write Keywords as Lightroom Hierarchy is checked, Lightroom is NOT exporting any of the highest level keywords, because I told it not to. But it IS exporting all of the appropriate descendants. When Lightroom imports the exported image, since the highest level keyword is not included, Lightroom is creating new keywords that are not part of my hierarchy scheme.

I haven't been able to puzzle through what is a good way of handling this situation. One option would be to check the top three boxes of the highest level keywords. I did not do that initially when I created the hierarchy because I couldn't imagine that the highest level keywords would be of interest, since their only purpose is to serve as an organization method. Is there another way I might attack this?

The keyword tag options (shown immediately above) are provided for every keyword in a keyword list. (Right-click on any keyword). If left unchecked (as above) that keyword will not be included in the image export. The keyword can still be searched upon in LrC, but it will not export with any images exported from the LrC catalogue. Any keywords below it in a hierarchical order that have the "Include on Export" box checked will export with the images they are assigned to, but I believe the hierarchical order might be lost. Some keyword tags might end up in the "other Keywords" section on another external viewer with the same keyword list imported—such as Adobe Bridge. I am not sure if "Export Containing Keywords" refers to synonyms of the keyword, or all other keywords under it in a hierarchical structure. Anybody know that answer?
 
If left unchecked (as above) that keyword will not be included in the image export. The keyword can still be searched upon in LrC, but it will not export with any images exported from the LrC catalogue. Any keywords below it in a hierarchical order that have the "Include on Export" box checked will export with the images they are assigned to, but I believe the hierarchical order might be lost.
That's right. If you have keywords A > B > C, and A is not marked Include On Export, then the exported order will be B > C, with no mention of A.

I am not sure if "Export Containing Keywords" refers to synonyms of the keyword, or all other keywords under it in a hierarchical structure. Anybody know that answer?
For the keyword A > B > C, Export Containing Keywords refers to the keywords A and B -- they "contain" C.
 
Status
Not open for further replies.
Back
Top