Hi!

As the current tagging of dt does not work as I expect it I played a bit 
in common/tags.c, mainly dt_tag_get_suggestions().

Actually, from l.495 I would expect, that as soon as I type a tag it is 
searched in the internal list of tags and, as the sql is, this is 
actually the substring search I was expecting to happen. However, it 
doesn't work that way in the GUI.

So I digged a bit further and there comes this magic with the tagxtag 
table. I admit that I do not entirly understand what's going on there, 
but as far as I understand it the notion is that it should do a sorting 
of suggestions by means of "this tag most likely implies that tag". As I 
understand it it's based on bean counting: 1x2 = 56 times, 1x3 = 7 times 
and so on, so tag 2 would rank higher than tag 3.

If I remember correctly, this was there way before hierarchical tags 
were implemented, and as it really screws up my suggestion list, I 
wonder if this is just not playing nicely with keyword chains. At least 
as far as I get it it doesn't live on a chain at all but on individual 
tags. Also, it seems that it's suggestions are somewhat sensitive to the 
initial loading of the tagxtag table, and in my case I found a bunch of 
strange values there, though I ingested my whole collection and dt 
should have seen all tags by that means and I'd expect therefore this 
table to be initialized as it should.

Anyway, point is, as soon as I comment l.495 to l.531 and just use the 
simple minded:

   snprintf(query, sizeof(query),
       "SELECT name, id FROM tags T WHERE T.name LIKE '%%%s%%' ",
       keyword);
   DT_DEBUG_SQLITE3_PREPARE_V2( dt_database_get(darktable.db), query,
                         -1, &stmt, NULL);

instead, my suggestion list looks like expected and I get this substring 
like search I mentioned in my other mail. (Ie. keying in "red" suggests 
"Plant|Flower|Red|Poppy").

Still, it is not suggested in the popup menu (in fact the pop up menu 
doesn't appear at all), but at least in the list below below the entry 
field. I did not yet fiddle out how the popup menu gets populated. It 
seems unrelated to the list widget. In fact I think it was also invented 
later on and there seems to be some inconsistency.

Any ideas on that front?

-- 

Kind regards,                /                 War is Peace.
                             |            Freedom is Slavery.
Alexander Wagner            |         Ignorance is Strength.
                             |
                             | Theory     : G. Orwell, "1984"
                            /  In practice:   USA, since 2001

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Darktable-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/darktable-users

Reply via email to