# Detect dups on Sort Field instead of 1st field

**URL:** <https://forums.ankiweb.net/t/detect-dups-on-sort-field-instead-of-1st-field/5411>\
**Category:** Suggestions\
**Created:** [November 27, 2020, 8:32pm UTC](https://forums.ankiweb.net/t/detect-dups-on-sort-field-instead-of-1st-field/5411 "2020-11-27T20:32:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Rumo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/rumo/32/1505_2.png) [@Rumo](https://forums.ankiweb.net/u/Rumo)\
**Post date:** [November 27, 2020, 9:01pm UTC](https://forums.ankiweb.net/t/detect-dups-on-sort-field-instead-of-1st-field/5411/2 "2020-11-27T21:01:06Z")

</div>

You’ve been beaten to it by mere hours. 😉

> [@"Show Duplicates" not working](https://forums.ankiweb.net/t/show-duplicates-not-working/2883/23):
>
> Thanks for uploading your collection. I was able to reproduce the issue! This looks like a bug. It happens when the sort field is set to something other than the first field. It’s set to English in your case. @dae, It seems different parts of the code have different assumptions about whether to check the first field or the sort field. Checking the first field is the expected behavior according to the [manual](https://docs.ankiweb.net/#/editing?id=adding-cards-and-notes). Both of [note\_is\_duplicate\_or\_empty](https://github.com/ankitects/anki/blob/f8f2839b55ec01c8796727ec5b9773e49272e9e7/rslib/src/notes.rs#L425) and [showDupes](https://github.com/ankitects/anki/blob/fa826d076ecb6751702c911f45549ac46c5b0fed/qt/aqt/editor.py#L520) work with the first field, but [writ…](https://github.com/ankitects/anki/blob/fa826d076ecb6751702c911f45549ac46c5b0fed/rslib/src/search/sqlwriter.rs#L425)

---

_[View the full topic](https://forums.ankiweb.net/t/detect-dups-on-sort-field-instead-of-1st-field/5411)._
