Category shows files that do not belong there, and counts are wrong

Started by Kucera, March 27, 2022, 10:00:23 PM

Previous topic - Next topic

Kucera

Hi,
one of my top categories should has 72 files in it, plus 423 more files in five subcategories, but it shows "vehicles (72 / 2,259), and when clicked, displays in the file window 2,259 instead of the expected 495 pictures. Most of them do not belong to any of the vehicles category or subcategory, of course. (see the attached categories.jpg).
If I ask for direct assignment only, it shows all 495 pics instead of the 72 that are in no subcategory. This happens with other top categories as well.

Additionally, top category counts are wrong (the other jpg)

I first noticed it after updating to the latest version today. I also ran database diagnoses, shows ok.
   A bug, or have I missed something simple (again)?

Mario

There are all "normal" categories. They contain the files you have manually assigned to them.
I'm not aware of any situation where IMatch would ever assign files to categories by itself. And the counts look OK-ish, too (rough counting).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Kucera

Hi, the man who never sleeps  :)
     thanks so much for the quick response.

Please have another look at the large screenshot - upper right you can see that none of the highlighted pics have 'vehicles' assigned to them;
and lower left (in the red frame) - how does 495 equal 2259, even roughly?  :(   and the counts for other subcategories do not add up properly either ...

But for the main worry - what can I do to make the file window show only those 72 that have no sub category?

I cannot honestly say whether the problem started with today's update; could I  uninstall and reinstall the previous version or would it kill my database?
Regards, Emil

JohnZeman

Quote from: Kucera on March 27, 2022, 11:00:55 PM
But for the main worry - what can I do to make the file window show only those 72 that have no sub category?

If you only want to see the 72 files that are directly assigned to your vehicles category , select the vehicles category then click the button I have highlighted in my attached screenshot.

As to the rest I think I'd do a database diagnostic test (Database > Database Tools > Database Diagnostics)

Kucera

Hello, and thanks. I kind of got there too, that way, but oddly enough I need to have also "Show Hierarchy" highlighted, unlike your picture.
But I thought it is supposed to work that way even without that. I can live with it, but it does not solve the strange counts, and does not explain why would extraneous (not so categorized) files show up in the count and in the file window, when hierarchy is not checked.
Very unusual for iMatch to work inconsistently, pretty much the first time in years and years ...
  BTW, I did run the diagnostics, several times, even re-booted in between. Shows "The data base has no errors"  :-\
Regards  Emil

Mario

If you show the hiearchy and you group by category, if a file is assigned to more than one category, it will show multiple times in the File Window and be counted.
Categories count each file only once, but if the File Window shows a file multiple times, it counts each occurrence.
See also: The Hierarchical Display Mode (Displaying files in sub-folders, child categories etc.)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Kucera

Hi, sorry to be a pest, but I think you would want to know, even (or especially?) if there is no explanation.

See in the attached that none of the files is the Vehicles category has been assigned to it, so why would they show up?

I have kind of resolved it, by creating a new category (veh1 above it), moved all the subcategories and the (truly assigned files) to it, deleted the original Vehicles altogether, and renamed the new one back to the same name.
So all is well but the mystery remains. This is not the first time my computer would to things (not just in iMatch) that nobody else encounters, maybe I am always asking too much of it, sigh..
Regards, Emil



Mario

Vehicles is a formula-based category. Which formula does it use?
It lists 1904 files, and that is what the File Window shows.

When you enable the show only directly assigned files option (as in your 2nd screen shot), the result must be empty, because you usually don't directly assign files to a formula-based category (this is what the sealed option is for, to prevent that). So, while the category (virtually contains 1904 files), it has no files directly assigned to it. Disable the option in the menu to see all files again.

1. A category A contains all files assigned to it and its child categories B,C,D.
2. If you assign the same file to multiple child categories (e.g. B and D) , it will still be counted once in A, B, D
3. But the File Window, when hierarchies are enabled, it will show the file in both A, B and D and count it 3 times.

If you are unsure about formulas, direct assignments etc. I recommend to read the corresponding help sections again.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Kucera


Quote from: Mario on March 29, 2022, 07:48:14 PM
Vehicles is a formula-based category. Which formula does it use? ...
If you are unsure about formulas, direct assignments etc. I recommend to read the corresponding help sections again.
Huge AHHA!
I have never knowingly used formulas for anything, never even noticed that the icon is different, let alone what it signified :-[
But likely as not I hit it some time in the dark past, not knowing what I was doing
I have that Help window open now!
Thank you very much, not least for your patience.
Best regards, Emil


Mario

Maybe you have copied & pasted a category, and when IMatch asked, chosen the option to create a formula-based category.
Formula-based category are quite powerful and it might be worth your time to learn about them. Maybe they will be prove helpful for what you, maybe not.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook