* mu-msg-iter.cc: don't skip dups on when threading

(due to sorting, we do not know if the same message are 'dup' or 'original'
  in the final results, so we need to calculate threading info for both)
This commit is contained in:
djcb
2012-12-27 12:07:43 +02:00
parent afc1258c10
commit 05b04bdaed

View File

@ -71,13 +71,17 @@ public:
if (threads) { if (threads) {
_matches.fetch(); _matches.fetch();
_cursor = _matches.begin(); _cursor = _matches.begin();
_skip_dups = FALSE;
_thread_hash = mu_threader_calculate _thread_hash = mu_threader_calculate
(this, _matches.size(), sortfield, descending); (this, _matches.size(), sortfield, descending);
_skip_dups =
(flags & MU_MSG_ITER_FLAG_SKIP_DUPS);
ThreadKeyMaker keymaker(_thread_hash); ThreadKeyMaker keymaker(_thread_hash);
enq.set_sort_by_key (&keymaker, false); enq.set_sort_by_key (&keymaker, false);
_matches = _enq.get_mset (0, maxnum); _matches = _enq.get_mset (0, maxnum);
} else if (sortfield != MU_MSG_FIELD_ID_NONE) { } else if (sortfield != MU_MSG_FIELD_ID_NONE) {
enq.set_sort_by_value ((Xapian::valueno)sortfield, enq.set_sort_by_value ((Xapian::valueno)sortfield,
descending); descending);