From abeac48522ded66e2f0e9aae704482355cb46e6a Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 24 Oct 2013 11:19:08 -0400 Subject: search: Add stable queries to thread search results These queries will match exactly the set of messages currently in the thread, even if more messages later arrive. Two queries are provided: one for matched messages and one for unmatched messages. This can be used to fix race conditions with tagging threads from search results. While tagging based on a thread: query can affect messages that arrived after the search, tagging based on stable queries affects only the messages the user was shown in the search UI. Since we want clients to be able to depend on the presence of these queries, this ushers in schema version 2. --- test/json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/json') diff --git a/test/json b/test/json index b87b7f6d..e07a2904 100755 --- a/test/json +++ b/test/json @@ -26,6 +26,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"total\": 1, \"authors\": \"Notmuch Test Suite\", \"subject\": \"json-search-subject\", + \"query\": [\"id:$gen_msg_id\", null], \"tags\": [\"inbox\", \"unread\"]}]" @@ -59,6 +60,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"total\": 1, \"authors\": \"Notmuch Test Suite\", \"subject\": \"json-search-utf8-body-sübjéct\", + \"query\": [\"id:$gen_msg_id\", null], \"tags\": [\"inbox\", \"unread\"]}]" -- cgit v1.2.3