- for (; notmuch_messages_valid (messages); notmuch_messages_move_to_next (messages)) {
- std::string term = "G";
- notmuch_message_t *message;
- message = notmuch_messages_get (messages);
- term += notmuch_message_get_thread_id (message);
- terms.insert (term);
- }
- return Xapian::Query (Xapian::Query::OP_OR, terms.begin(), terms.end());
- } else {
- throw Xapian::QueryParserError ("missing } in '" + str + "'");