Buggy sort on attributes?

Started by Darius1968, May 15, 2022, 06:10:22 AM

Previous topic - Next topic

Darius1968

I have in my file window - via a focused folder in Media & Folders - 70 jpeg image files.  25 of these have a caption (mediated by {File.AT.File Info.Caption}
Right now, IMatch isn't correctly sorting these files because the remaining 45 files (that don't have a value for the attribute) are all mixed together with the others that do have a value. 
To convince myself that there might be software-error, I simply set up a new sort preset based on just {File.AT.File Info.Caption}.  And, still, this idiosyncrasy manifests. 

If, on the other hand, I have a bunch of files in my file window that all have a value for said attribute (say, three sets), then the sort works; It's only in the presence of files with null values for the attribute that cause a problem. 

So, I leave it with you for your investigation. 

Thanks! 

Mario

When I setup a sort profile based on an Attribut (Title) and only half of the attributes contain data, the files without attribute data are sorted in front of the files with attributes, and the files with attributes are sorted based on the content of their attributes. Which looks OK to me.

It is recommend to always add a second sort criteria when you deal with only partially filled first-level sort criteria, to produce deterministic sort order. Maybe use the file name as the second level, or the date or whatever.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Quote from: Mario on May 15, 2022, 10:31:48 AM
It is recommend to always add a second sort criteria when you deal with only partially filled first-level sort criteria, to produce deterministic sort order. Maybe use the file name as the second level, or the date or whatever.
The error I just described occurs regardless of however many keys are in the sort preset. 

Okay, I've found a way that I can have it so that "the files without attribute data are sorted in front of the files with attributes": 
I have to be sure that indeed each and every file in the scope has a record!  Once, that stipulation is met, the sort is as expected.  The only issue I've so far encountered with meeting that requirement is that at least one of the fields in the attribute set has to be filled with data (not necessarily the one that I'm sorting on, but nonetheless one of the fields).  This is because that is the only way to ensure that the file does have an attribute record. 
So, is there an automatic way to add these records? 

Mario

Most likely this is linked to the already reported and fixed (for the next release) bug #01674.
Please see the release notes for the next release for a list of all reported and fixed bugs.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook