fix(zopk): Sortowanie duplikatów encji od największego podobieństwa

Zmiana kolejności ORDER BY w find_duplicate_entities():
- Teraz: sim DESC, entity_type, mentions DESC
- Wcześniej: entity_type, mentions DESC, sim DESC

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-01-17 10:19:16 +01:00
parent 9ae72bb2fa
commit 8bdbd04c8c

View File

@ -1717,9 +1717,9 @@ def find_duplicate_entities(
)
{type_filter}
ORDER BY
sim DESC,
e1.entity_type,
GREATEST(e1.mentions_count, e2.mentions_count) DESC,
sim DESC
GREATEST(e1.mentions_count, e2.mentions_count) DESC
LIMIT :limit
""")