Sort Ascending (Description), Sort Ascending (Keywords) Bug?

Started by Darius1968, May 31, 2022, 04:37:38 AM

Previous topic - Next topic

Darius1968

The following screenshot (Sort-Description--Sort-Keywords.png) shows that I'm trying to sort - with profile "Description (test)" - with the expected outcome that the one-and-only file with a description would be paced first (which it is if I sort exclusively on the Description tag), and only then would files with keywords be favored among the earlier files in the file window. 
What I'm actually getting, however, is that with this sort profile, the only file with a description has been demoted to 2nd-place. 


So, I'm just leaving this with you to determine if this is a bug. 

Thanks. 

Mario

1.  You sort by description and flat keywords (why).
Are you sure the flat keywords contain what you think they contain. They may not contain the same values as the hierarchical keywords IMatch shows everywhere unless you have written back.

2.  Files without values for descriptions will sort only by keywords. If there are no keywords, their order is random since you did not provide a fallback 3rd. sort attribute.

3.  I have created a set of files. Some without description. Some without keywords. Some with neither keywords nor descriptions. Some with descriptions and keywords.
Then I re-created your sort profile.

The outcome is correct as far as I can tell.
The sort priority is description. If a file has no description, it is sorted by the concatenated keywords (note that there is no inherent order in keywords). If a file has neither, the sort order is 'random'.

Looks OK to me.
Anything special about your descriptions or flat keywords? Do you get the same result when you sort by the standard hierarchical keywords?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

1.  I'm sorting by description and keywords because it helps me organize my list of photos that I'm culling through - files that have either of those tags are the more important ones; those with both tags are the most important! 
Yes, I'm sure that the files have the keywords that I'm interested in because (as will be shown below) my grid list confirms it.

3.  Well the following screenshot represents a dozen files that I'm sorting Description (ascending), Keywords (ascending).  Only one file has a description.  There are five with keywords, but no description.  The remaining files at the bottom have neither a description nor a keyword. 


The file with the description is in 2nd-place.  I would expect with my sort order for it to be at the top.  Then the five files with keywords would follow, and finally, those files with neither tag having a value should be at the end, which they are. 

Mario

I've tried to reproduce this again. Here is my test result, which looks correct to me:



For sorting, IMatch combines the contents of the description column with the contents of the keyword column, in the order in which the keywords are stored in the database.
So, if a file has no description, the first letter of the first keyword (or more) controls the order, else the description.
If a file has neither a description nor a keyword, the order is undefined.

This is what I see in my example above.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Well, with your provided screenshot, I see that the behavior is much more like what mine is. 

I would have thought that the output should be something like this: 

DESCRIPTION             KEYWORDS
     -                                 -
     -                                 -
A Description                    A
A Description                    X
Description                       B
Elephant                          B
Elephant                          C
Zulu
                                    Architecture|Building Materials|Brick
                                    Science|Engineering

I guess, from the way it is presented in your screenshot, null values are not on the scale, whereas I thought that they were on the scale, at the lowest possible value. 

Mario

Quotenull values are not on the scale, whereas I thought that they were on the scale, at the lowest possible value. 

Null/Empty values are ignored during the sort. They are not (and cannot) by somehow 'factored in'.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook