<table><tr><td style="">dfaure accepted this revision.<br />dfaure added a comment.<br />This revision is now accepted and ready to land.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D28615">View Revision</a></tr></table><br /><div><div><p>Works great. Given the number of matches is limited by m_limit, this actually returns more useful contacts than before, to the user it's not just about deduplication (libkdepim does deduplicate on top anyway).</p>

<p>One improvement would be to prefer matches with full name over matches without name.</p>

<p>I type "vkrau" and it says:<br />
12:19:15.163 kmail2(16923/16923) org.kde.pim.akonadi_search_pim: processEnquire Match: "vkrause@kde.org" (50%), docid 7318456<br />
12:19:15.163 kmail2(16923/16923) org.kde.pim.akonadi_search_pim: processEnquire Skipped duplicate match "vkrause@kde.org" (50%) docid 13800517<br />
12:19:15.163 kmail2(16923/16923) org.kde.pim.akonadi_search_pim: processEnquire Match: "Volker Krause <vkrause@kde.org>" (47%), docid 1292769881<br />
12:19:15.163 kmail2(16923/16923) org.kde.pim.akonadi_search_pim: processEnquire Skipped duplicate match "Volker Krause <vkrause@kde.org>" (47%) docid 3129445885<br />
and I end up with just vkrause@kde.org in the completion, no name. Ah but this code returns both matches, it's libkdepim which deduplicates on top, and wrongly.</p>

<p>So indeed the question is whether this code should do full deduplication (like your TODO says), or if that part is for libkdepim (which should then be improved).</p>

<p>This also makes me wonder if the limit here is too low. I never realized I wasn't getting all matches but just a subset.</p>

<p>Thanks!</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R42 Akonadi Search</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28615">https://phabricator.kde.org/D28615</a></div></div><br /><div><strong>To: </strong>dvratil, KDE PIM, dfaure<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>