[PATCH v2 4/7] Add internal functions to search for alternate doc types

David Bremner david at tethera.net
Tue Apr 5 18:52:22 PDT 2016


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> Publicly we are only exposing the non-ghost documents (of "type"
> "mail").  But internally we might want to inspect the ghost messages
> as well.
>
> This changeset adds two new private interfaces to queries to recover
> information about alternate document types.
> ---
>  lib/notmuch-private.h | 10 ++++++++++
>  lib/query.cc          | 18 ++++++++++++++++--
>  2 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
> index 5dd4770..cbfc144 100644
> --- a/lib/notmuch-private.h
> +++ b/lib/notmuch-private.h
> @@ -477,6 +477,16 @@ void
>  _notmuch_doc_id_set_remove (notmuch_doc_id_set_t *doc_ids,
>                              unsigned int doc_id);
>  
> +notmuch_status_t
> +_notmuch_query_search_messages_type_st (notmuch_query_t *query,
> +					const char *type,
> +					notmuch_messages_t **out);
> +
> +notmuch_status_t
> +_notmuch_query_count_messages_type_st (notmuch_query_t *query,
> +				       const char *type,
> +				       unsigned *count_out);

I was wondering if we should follow Xapian nomenclature and call these functions

_notmuch_query_{search, count}_documents

This assumes only going with the status returning versions


More information about the notmuch mailing list