Hi, attached a dirty hack to get direct tag matches on top of list.
first the tagxtag things, then overwrite the ids from ...LIKE '%%%s%%' (dirty means: using 100000 as a high==max count) my driving-me-crazy example is having two animal tags: zebra zebramanguste thus tagging a real 'zebra' ends up with zebramanguste, the zebra itself is about 40 entries down the list. patch wfm. kind regards, maybe later in irc. Wolfgang
diff --git a/src/common/tags.c b/src/common/tags.c index 3c7df2d..d23a0fb 100644 --- a/src/common/tags.c +++ b/src/common/tags.c @@ -458,6 +458,16 @@ uint32_t dt_tag_get_suggestions(const gchar *keyword, GList **result) "ORDER BY TXT.count DESC", NULL, NULL, NULL); + /* + * have the direct matches at top of list + */ + DT_DEBUG_SQLITE3_EXEC(dt_database_get(darktable.db), + "INSERT or REPLACE INTO memory.taglist (id, count) " + "SELECT id,100000 FROM memory.tagq", + NULL, NULL, NULL); + + + /* Now put all the bits together */ DT_DEBUG_SQLITE3_PREPARE_V2(dt_database_get(darktable.db), "SELECT T.name, T.id FROM tags T "
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________ darktable-devel mailing list darktable-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/darktable-devel