- query = notmuch_query_create (notmuch, query_string);
- if (unlikely (query == NULL))
+ matched_query_string = talloc_asprintf (ctx, "%s AND (%s)",
+ thread_id_query_string,
+ query_string);
+ if (unlikely (matched_query_string == NULL))
+ return NULL;
+
+ thread_id_query = notmuch_query_create (notmuch, thread_id_query_string);
+ if (unlikely (thread_id_query == NULL))
+ return NULL;
+
+ matched_query = notmuch_query_create (notmuch, matched_query_string);
+ if (unlikely (thread_id_query == NULL))