I recently checked those 5000+ keywords that I had been distributed over numerous levels. As these are basically event based, there are numerous double entries as the same entry is being allowed when being placed under another category. I found also numerous typing errors, different spelling and additions to names that should be separated.
Here is where the Lightroom sqlite database stores all keywords:
CREATE TABLE AgLibraryKeyword ( id_local INTEGER PRIMARY KEY, id_global UNIQUE NOT NULL, dateCreated NOT NULL DEFAULT '', genealogy NOT NULL DEFAULT '', imageCountCache DEFAULT -1, includeOnExport INTEGER NOT NULL DEFAULT 1, includeParents INTEGER NOT NULL DEFAULT 1, includeSynonyms INTEGER NOT NULL DEFAULT 1, lastApplied, lc_name, name, /* THE KEYWORD */ parent INTEGER /* THE PARENT KEYWORD */ ); /* AgLibraryKeywordCooccurrence holds co-occurrence */ /* AgLibraryKeywordImage links keyword and picture */ /* AgLibraryKeywordPopularity holds occurrence */ /* AgLibraryKeywordSynonym is empty */
From theory it would be best, to have some UNIQUE INDEX (name) and not UNIQUE INDEX (parent, name) as this allows double entries. Double entries create confusion in search results, need extra management, blow up tables and slow down everything.
Unfortunately, as I import name lists of athletes before events, double entries are largely unavoidable.
There seems only one solution: Forget everything you heard about keyword hierarchy and use a flat design. Set all keywords on the same root level will remain unique.
Whenever I upload a new set of names only those-existing names are being added. After the event, I drop all unused keywords. Life can be so simple.
But if you want to group keywords? No problem: Add one or more empty sub level categories to your main keyword. This allows to group by “TCR” in my example.
At the end this looks like a reverse hierarchy ;-)
[bctt tweet=”Reverse hierarchy of Lightroom keywords. Why it is useful.”]