Manage keywords outside the database

Manage keywords outside the database so they can be saved like 
presets or watermarks and easily switched from one PC to another.


This feature request already exists, at least in part:

It has a lot of votes, so best to continue with the older topic if possible. Unless it’s obsolete or doesn’t match what you want. I hope this helps.

This is the case, PL stores keywords in an xmp since v5.
You just have to check the option in the preferences.

1 Like
Okay, let me clarify... What I want is to be able to type two or three letters 
from the beginning of a keyword in the keyword palette to find it.
 It doesn't matter if it's in an XMP file, the database, etc. 
If I switch computers, I want to be able to easily retrieve all
 my keywords without having to redraw all my photos to rebuild the
 keyword list in the palette. 
If you do wildlife photography, especially insect or flowers  photography,
 you'll understand 
my problem better.

That’s the case, I work with 2 PCs and with the xmp I find my keywords on both.
When I enter the first letters of the keyword I have a list corresponding to these first letters which is displayed.

1 Like

Depending on your exact needs, you may want to look into a separate DAM (digital asset manager), which can do all you’ve asked for and more. I use IMatch (Windows only), but there are also other alternatives. They shouldn’t lock you in to any proprietary scheme.

The problem is that your two lists correspond to the photos you've
 processed on each PC. I want the same list on three PCs, 
without the same photos, and I want to be able to save it and 
transfer it from one PC to another.
My needs are basic. Adding keywords to exported JPEG photos works 
with any development software, so it's not proprietary. 
I simply want a list of keywords that can be transferred
 between PCs for convenience and standardization.

I then use XnView MP to rename my JPEGs as needed.

May this SQL select helps you out.
Connect with some SQL tool to PL database (i suggest DBeaver).
And run this SQL select:

/* Keyword list  
 * Fields:
 *   key_id -> The keyword unique ID in PL database 
 *   key_value -> keyword 'name' (even its not assigned to photo)
 *   key_count -> how many item (photos+VC) has this keyword (if 0 than keyword may not assigned)
 * Note: no nice keyword hierarchy handling! So, duplicity may appear if keyword is same in different hierarchy levels, etc.  
 */
Select
  k.Id as key_id 
, k.Value as key_value 
, (count(*) -1) as key_count
from Keywords k
  left join ItemsKeywords ik on k.Id = ik.KeywordId 
  left join Items i on ik.ItemId = i.Id
  left join Sources s on s.Id = i.SourceId 
where 1 = 1 
group by k.Value
order by k.Value 

Result like:

I hope its helps. Any question, let me know.

Ok you will not manage the same photos on each PC.
What you can do, depending on the number of keywords, is put all the keywords on a photo and put it on each PC to retrieve the keywords.

1 Like

Thanks ! I will study it …

1 Like

In the meantime i create a simple ‘Hierarchy style’ SQL select.

/* 
 * Keywords in hierarchy, like 'What\Bird\Pelican\Brown Pelican' style  
 * Fields: 
 *   key_hierarchy_name -> the 'full path' name
 *   key_hierarchy_name -> the 'full path' in pl, database ID
 * Note: its limited to 4 level like: 1\2\3\4 (1 is the root, so may better if we call 3 level)
 * Note: i know with recursive sql is more nice (its just force and limited), but i think 1\2\3\4 is just fine (and thats the time i have)   
*/ 
SELECT 
  key_hierarchy_name
, key_hierarchy_id  
FROM 
(
SELECT 
  lvl3.*
, (CASE 
	when x_parent_3_value is not null then (concat(x_parent_3_value, "\", x_parent_2_value, "\", x_parent_1_value, "\", key_value)) 
	when x_parent_3_value is null and x_parent_2_value is not null then (concat(x_parent_2_value, "\", x_parent_1_value, "\", key_value))
	when x_parent_2_value is null and x_parent_1_value is not null then (concat(x_parent_1_value, "\", key_value))
	else key_value
   END) as key_hierarchy_name
, (CASE 
	when x_parent_3_value is not null then (concat(x_parent_3_id, "\", x_parent_2_id, "\", x_parent_1_id, "\", key_id)) 
	when x_parent_3_value is null and x_parent_2_value is not null then (concat(x_parent_2_id, "\", x_parent_1_id, "\", key_id))
	when x_parent_2_value is null and x_parent_1_value is not null then (concat(x_parent_1_id, "\", key_id))
	else key_id
   END) as key_hierarchy_id   
FROM 
(
SELECT 
  k.Id as key_id
, k.Value as key_value
, (SELECT k2.Value from Keywords k2 where k2.Id = k.ParentId) as x_parent_1_value
, (SELECT k3.Value from Keywords k3 where k3.id = ((SELECT k2.ParentId from Keywords k2 where k2.Id = k.ParentId))) as x_parent_2_value
, (SELECT k4.Value from Keywords k4 where k4.id = ((SELECT k3.parentid from Keywords k3 where k3.id = ((SELECT k2.ParentId from Keywords k2 where k2.Id = k.ParentId))))) as x_parent_3_value
, (SELECT k2.Id from Keywords k2 where k2.Id = k.ParentId) as x_parent_1_id
, (SELECT k3.Id from Keywords k3 where k3.id = ((SELECT k2.ParentId from Keywords k2 where k2.Id = k.ParentId))) as x_parent_2_id
, (SELECT k4.id from Keywords k4 where k4.id = ((SELECT k3.parentid from Keywords k3 where k3.id = ((SELECT k2.ParentId from Keywords k2 where k2.Id = k.ParentId))))) as x_parent_3_id
from Keywords k 
) lvl3
) lvl3_sum
order by key_hierarchy_name

Results like:

I use Adobe Bridge to do all my keywording. It’s free if you have an Adobe account.