mu-server: more info for mu4e-analyze-last-query
Include the search parameters besides the query.
This commit is contained in:
@ -670,14 +670,23 @@ Server::Private::find_handler(const Command& cmd)
|
|||||||
throw Error{Error::Code::InvalidArgument, "invalid batch-size {}", batch_size};
|
throw Error{Error::Code::InvalidArgument, "invalid batch-size {}", batch_size};
|
||||||
|
|
||||||
auto qflags{QueryFlags::SkipUnreadable}; // don't show unreadables.
|
auto qflags{QueryFlags::SkipUnreadable}; // don't show unreadables.
|
||||||
if (descending)
|
Sexp resprops;
|
||||||
|
if (descending) {
|
||||||
qflags |= QueryFlags::Descending;
|
qflags |= QueryFlags::Descending;
|
||||||
if (skip_dups)
|
resprops.put_props(":reverse", Sexp::t_sym);
|
||||||
|
}
|
||||||
|
if (skip_dups) {
|
||||||
qflags |= QueryFlags::SkipDuplicates;
|
qflags |= QueryFlags::SkipDuplicates;
|
||||||
if (include_related)
|
resprops.put_props(":skip-dups", Sexp::t_sym);
|
||||||
|
}
|
||||||
|
if (include_related) {
|
||||||
qflags |= QueryFlags::IncludeRelated;
|
qflags |= QueryFlags::IncludeRelated;
|
||||||
if (threads)
|
resprops.put_props(":include-related", Sexp::t_sym);
|
||||||
|
}
|
||||||
|
if (threads) {
|
||||||
qflags |= QueryFlags::Threading;
|
qflags |= QueryFlags::Threading;
|
||||||
|
resprops.put_props(":threads", Sexp::t_sym);
|
||||||
|
}
|
||||||
|
|
||||||
StopWatch sw{mu_format("{} (indexing: {})", __func__,
|
StopWatch sw{mu_format("{} (indexing: {})", __func__,
|
||||||
indexer().is_running() ? "yes" : "no")};
|
indexer().is_running() ? "yes" : "no")};
|
||||||
@ -696,11 +705,12 @@ Server::Private::find_handler(const Command& cmd)
|
|||||||
const auto bsize{static_cast<size_t>(batch_size)};
|
const auto bsize{static_cast<size_t>(batch_size)};
|
||||||
const auto foundnum = output_results(*qres, bsize);
|
const auto foundnum = output_results(*qres, bsize);
|
||||||
|
|
||||||
output_sexp(Sexp().put_props(
|
output_sexp(resprops.put_props(
|
||||||
":found", foundnum,
|
":found", foundnum,
|
||||||
":query", q,
|
":query", q,
|
||||||
":query-sexp", parse_query(q, false/*!expand*/).to_string(),
|
":query-sexp", parse_query(q, false/*!expand*/).to_string(),
|
||||||
":query-sexp-expanded", parse_query(q, true/*expand*/).to_string()));
|
":query-sexp-expanded", parse_query(q, true/*expand*/).to_string(),
|
||||||
|
":maxnum", maxnum));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user