Thesaurus "Apply all changes" removes keywords from files erroneously

Started by UdoL, March 17, 2024, 11:39:09 PM

Previous topic - Next topic

UdoL

Hi Mario,

when rearranging Thesaurus keywords and "Apply changes to all files in the database", IMatch will remove keywords from files if they are linked to keywords that were deleted or moved.


Look at this Thesaurus structure:

├── Keyword "A"
│  └── Link "Z"
└── Keyword "B"
    ├── Link "Z"
    └── Keyword "B1"
        └── Link "Z"


 "Z" is the same keyword in all 3 instances.

Now, if you delete keyword "B1" or move it one level up, all files with keywords "A" and "Z" and all files with keywords "B" and "Z" will lose the keyword "Z".

In my case about 3000 files were affected. Fortunately, I noticed the error and was able to reconstruct them by reimporting the metadata.


IMatch 2023.7.2

Mario

Interesting case.
When you remove the B1 keyword, what does actually happen?

You assign B1 to a file:

1. The file gets the B1 keyword
2. The file gets the Z keyword, because of the link from B1 to Z

You un-assign B1 from a file:

1. The B1 keyword is removed
2. The Z keyword is removed , because of the link from B1 to Z

You delete the B1 keyword in the thesaurus and make it apply the changes to to all files.

This translates to:

1. Remove the B1 keyword
2. Remove the Z keyword, because of the link from B1 to Z

The thesaurus should handle this particular situation by applying the link only to files which have the link parent keyword.
I'm quite sure I've considered that, but applying changes done to the thesaurus to keywords in files is really, really complex and this might be a yet undiscovered issue.

IMatch 2023 with this new thesaurus feature was released 8 months ago, and so far nobody ran into this problem.
I'll have a look in the next free time window and include a bug fix in the next IMatch release.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I could reproduce and fix this issue for the next release.
Thanks for bringing it to my attention.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook