* mu-query: no need for sorting the first query when we do the sorting later

This commit is contained in:
djcb 2012-12-27 16:00:13 +02:00
parent cfda1932bc
commit 12f307c1b3
1 changed files with 4 additions and 3 deletions

View File

@ -499,14 +499,15 @@ mu_query_run (MuQuery *self, const char *searchexpr, MuMsgFieldId sortfieldid,
* query since we can do it in the second one
*/
first_flags = inc_related ? (flags & ~MU_QUERY_FLAG_THREADS) : flags;
iter = mu_msg_iter_new (
reinterpret_cast<XapianEnquire*>(&enq),
maxnum,
sortfieldid,
/* with inc_related, we do the sorting in the
* second query
*/
inc_related ? MU_MSG_FIELD_ID_NONE : sortfieldid,
msg_iter_flags (first_flags),
err);
/*
* if we want related messages, do a second query,
* based on the message ids / refs of the first one