# Keyword list limitation?



## JML (Apr 16, 2020)

I don't often use the full keyword list, but just discovered that it truncates. On one computer, it stops at "K", on another (with larger display), it truncates at "S". The same if I go into Metadata filter and use the keyword list there.  

Is there a limitation to the number of keyword being displayed or is this a bug?  Both of my computers updated to the April 2020 version, not sure if that issue existed before. 

Also, is there a way of editing that list other than one keyword at a time? I'd like to purge a lot of them, but don't want to right-click, select delete and then confirm that. It would take hours. 

Thanks for any pointers.


----------



## clee01l (Apr 16, 2020)

I believe there is a limit of something around 2000 (2048?) in the list function that is a part of the OS API that Lightroom uses 


Sent from my iPad using Tapatalk


----------



## johnrellis (Apr 16, 2020)

There's a long-standing bug in Windows LR that silently limits the Keyword List (and the Folders and Collections panels) to display about 1500 items. LR fails very ungracefully once you exceed that limit.

The workaround is to introduce hierarchical keywords and keep most of the hierarchy collapsed at any one time, so no more than 1500 are showing at any one time. See this post for a trick to make it easier to create the hierarchy:
https://feedback.photoshop.com/photoshop_family/topics/i_cannot_access_the_whole_keyword_list_to_edit?topic-reply-list[settings][filter_by]=all&topic-reply-list[settings][reply_id]=20065740#reply_20065740

To delete many keywords at once, click the first one and shift-click the last, or control-click additional ones. Then click the "-" button at the top of the Keyword List panel. (Another bug -- if you select multiple keywords, right-click Delete will only delete the one keyword you've right-clicked.)

Please add your constructive opinion and Me Too vote to this bug report in the official Adobe feedback forum:
https://feedback.photoshop.com/photoshop_family/topics/i_cannot_access_the_whole_keyword_list_to_edit

Who knows, Adobe might eventually fix this, or at least issue a warning to the user.


----------



## johnrellis (Apr 16, 2020)

clee01l said:


> ...a limit ... in the list function that is a part of the OS API that Lightroom uses


LR developers took a shortcut when first developing the LR Windows UI toolkit and never finished the implementation:
https://feedback.photoshop.com/phot...t[settings][reply_id]=19142555#reply_19142555


----------



## JML (Apr 16, 2020)

johnrellis said:


> There's a long-standing bug in Windows LR that silently limits the Keyword List (and the Folders and Collections panels) to display about 1500 items. LR fails very ungracefully once you exceed that limit.
> 
> The workaround is to introduce hierarchical keywords and keep most of the hierarchy collapsed at any one time, so no more than 1500 are showing at any one time. See this post for a trick to make it easier to create the hierarchy:
> https://feedback.photoshop.com/photoshop_family/topics/i_cannot_access_the_whole_keyword_list_to_edit?topic-reply-list[settings][filter_by]=all&topic-reply-list[settings][reply_id]=20065740#reply_20065740
> ...


Thank you, this is very useful!


----------



## JML (Apr 16, 2020)

After deleting a bunch of keywords from the beginning of the list, I can now see entries through "G", telling me that this is either a bug or limitation. It doesn't tell you how many keywords there are, even you highlight them all, but I have counted roughly 1700 of them. Not a number that strikes any resembles with an exponent of 2, but confirming the number of Johnkellis.


----------



## johnrellis (Apr 16, 2020)

JML said:


> I have counted roughly 1700 of them. Not a number that strikes any resembles with an exponent of 2


Geeking out: The maximum size of a low-level window is 2^15 = 32,768. On my Windows LR, each line in Keyword List panel is 20 pixels high. (Take a screenshot and magnify it in Photosohp.) So that's a maximum of 32,768 / 20 = 1638 lines. I'm not sure if the filter box at the top of the panel is part of the same low-level window or is separate.


----------



## johnrellis (Apr 16, 2020)

Also, you can do the menu command Metadata > Export Keywords to get a text file with all your keywords.

Also, also, you can do Metadata > Purge Unused Keywords to delete all keywords that aren't assigned to any photos.


----------



## JML (Apr 16, 2020)

johnrellis said:


> Also, you can do the menu command Metadata > Export Keywords to get a text file with all your keywords.
> 
> Also, also, you can do Metadata > Purge Unused Keywords to delete all keywords that aren't assigned to any photos.


Thanks both useful! Is there any way to sort by the number of entries in keywords? I would like to highlight and delete all the keywords with only one entry...


----------



## johnbeardy (Apr 16, 2020)

Only by a plugin like my Search and Replace, and it's filtering rather than sorting.

On your overall problem, the keywords are all present but are not displayed. Maybe introduce some hierarchy into your keyword list? So add some parent folders and put the actual keywords under them. I doubt Adobe will ever solve the problem, but how often does one scroll down a long keyword list? It's a lot easier to use the Keywording list's filter box to get to keywords.


----------



## johnrellis (Apr 16, 2020)

johnbeardy said:


> Only by a plugin like my Search and Replace


I think JML wants to find all keywords that are assigned to exactly one photo? But Search Replace Transfer filters photos by the number of keywords assigned to a photo, which is different. Or did I misunderstand?


----------



## JML (Apr 16, 2020)

johnbeardy said:


> Only by a plugin like my Search and Replace, and it's filtering rather than sorting.
> 
> On your overall problem, the keywords are all present but are not displayed. Maybe introduce some hierarchy into your keyword list? So add some parent folders and put the actual keywords under them. I doubt Adobe will ever solve the problem, but how often does one scroll down a long keyword list? It's a lot easier to use the Keywording list's filter box to get to keywords.


Thank you, I started that after seeing it as a work-around everywhere. That works to some extent, I just need to be more diligent about not creating onsies and twosies. I believe the correct syntax to enter a NEW keyword under an existing topic is  neword < _Topic, correct? It doesn't seem to pre-populate the existing topics, I needed to type it in correctly, making for more potential mistakes. 

Where do I get your plugin?


----------



## JML (Apr 16, 2020)

johnrellis said:


> I think JML wants to find all keywords that are assigned to exactly one photo? But Search Replace Transfer filters photos by the number of keywords assigned to a photo, which is different. Or did I misunderstand?


Correct, that is what I meant. Easy way to diminish the keyword list by eliminating those.


----------



## johnrellis (Apr 17, 2020)

I adapted a previous script to help you remove these keywords.  Download it from here:
https://www.dropbox.com/s/hvjestl5xdz71sz/unique-keywords.lua?dl=0
Make sure you backup your catalog before running it!!!

From the top of the file:


> This script finds all keywords that are assigned to exactly one photo and
> removes those keywords from the photos. You can then delete those
> keywords by doing Metadata > Purge Unused Keywords.
> 
> ...


----------



## johnbeardy (Apr 17, 2020)

Yes, it counts the number of keywords applied to photos, which I find useful for boosting my keywording, and also the length of the total keywords string which was limited by some stock agencies.

We try not to be mercenary here, but the plugin is in my signature.

John


----------



## johnbeardy (Apr 17, 2020)

It may be that I misread your post as trying to add more keywords rather than rationalize them!


----------



## JML (Apr 18, 2020)

johnrellis said:


> I adapted a previous script to help you remove these keywords.  Download it from here:
> https://www.dropbox.com/s/hvjestl5xdz71sz/unique-keywords.lua?dl=0
> Make sure you backup your catalog before running it!!!
> 
> From the top of the file:


Thank you much!


----------



## JML (Aug 14, 2020)

Has this issue of a limitation on how many keywords Lightroom displays on Windows been fixed (either by Adobe or by Microsoft)? I had that listing limitation and saw only about 1700 keywords. After reading up on here, started using nested master keywords. Since I have been doing that, I can now see all of my remaining keywords and it is about 2800 (3300 in all, including the nested ones)! 

LR CC Classic, Windows 10, latest everything.


----------



## johnbeardy (Aug 14, 2020)

No, no change.


----------

