<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/query.cc, branch 0.3.1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.3.1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.3.1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2010-04-24T14:27:50Z</updated>
<entry>
<title>lib: Ensure notmuch_query_search_messages returns NULL on an exception.</title>
<updated>2010-04-24T14:27:50Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-04-24T14:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=138fd38afe6c6d44179952dd17c4b07e9223ad37'/>
<id>urn:sha1:138fd38afe6c6d44179952dd17c4b07e9223ad37</id>
<content type='text'>
Previously, this function may have segfaulted immediately after
reporting the exception.
</content>
</entry>
<entry>
<title>query.cc: allow to return query results unsorted</title>
<updated>2010-04-21T23:06:05Z</updated>
<author>
<name>Sebastian Spaeth</name>
<email>Sebastian@SSpaeth.de</email>
</author>
<published>2010-04-16T06:38:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=aadb15a002dc01903d60ca40048d6d4ef3990863'/>
<id>urn:sha1:aadb15a002dc01903d60ca40048d6d4ef3990863</id>
<content type='text'>
Previously, we always sorted the returned results by some string value,
(newest-to-oldest by default), however in some cases (as when applying
tags to a search result) we are not interested in any special order.

This introduces a NOTMUCH_SORT_UNSORTED value that does just that. It is
not used at the moment anywhere in the code.

Signed-off-by: Sebastian Spaeth &lt;Sebastian@SSpaeth.de&gt;
</content>
</entry>
<entry>
<title>Name thread based on matching msgs instead of first msg.</title>
<updated>2010-04-21T21:56:53Z</updated>
<author>
<name>Jesse Rosenthal</name>
<email>jrosenthal@jhu.edu</email>
</author>
<published>2010-04-17T17:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4971b85641def6b17072ae1b0de0adf15d197f2c'/>
<id>urn:sha1:4971b85641def6b17072ae1b0de0adf15d197f2c</id>
<content type='text'>
At the moment all threads are named based on the name of the first message
in the thread. However, this can cause problems if people either start
new threads by replying-all (as unfortunately, many out there do) or
change the subject of their mails to reflect a shift in a thread on a
list.

This patch names threads based on (a) matches for the query, and (b) the
search order. If the search order is oldest-first (as in the default
inbox) it chooses the oldest matching message as the subject. If the
search order is newest-first it chooses the newest one.

Reply prefixes ("Re: ", "Aw: ", "Sv: ", "Vs: ") are ignored
(case-insensitively) so a Re: won't change the subject.

Note that this adds a "sort" argument to _notmuch_thread_create and
_thread_add_matched_message, so that when constructing the thread we can
be aware of the sort order.

Signed-off-by: Jesse Rosenthal &lt;jrosenthal@jhu.edu&gt;
</content>
</entry>
<entry>
<title>lib: Handle "*" as a query string to match all messages.</title>
<updated>2010-04-10T00:43:58Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-04-09T23:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e100871981daeb3bb9a6c8718c95e6044953b57f'/>
<id>urn:sha1:e100871981daeb3bb9a6c8718c95e6044953b57f</id>
<content type='text'>
This seems like a generally useful thing to support, (but the previous
support through an empty string was not convenient for some users,
(such as the command-line client).
</content>
</entry>
<entry>
<title>lib: Rename iterator functions to prepare for reverse iteration.</title>
<updated>2010-03-09T17:22:29Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-03-09T17:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4e5d2f22db290a830c0267f34b519c6138af00ed'/>
<id>urn:sha1:4e5d2f22db290a830c0267f34b519c6138af00ed</id>
<content type='text'>
We rename 'has_more' to 'valid' so that it can function whether
iterating in a forward or reverse direction. We also rename
'advance' to 'move_to_next' to setup parallel naming with
the proposed functions 'move_to_first', 'move_to_last', and
'move_to_previous'.
</content>
</entry>
<entry>
<title>lib: Explicitly set BoolWeight when searching.</title>
<updated>2010-01-09T19:16:40Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-01-09T19:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=45b1856782beca246cd2670ea6b122b0c9e06fc0'/>
<id>urn:sha1:45b1856782beca246cd2670ea6b122b0c9e06fc0</id>
<content type='text'>
All notmuch searches currently sort by value (either date or message
ID) so it's just wasted effort for Xapian to compute relevance values
for each result. We now explicitly tell Xapian that we're uninterested
in the relevance values.
</content>
</entry>
<entry>
<title>Silence compiler warning by initializing a variable.</title>
<updated>2009-11-28T02:38:06Z</updated>
<author>
<name>Jeffrey C. Ollie</name>
<email>jeff@ocjtech.us</email>
</author>
<published>2009-11-25T13:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e991148b00fc683d1591ba27c387c6156d0ee67e'/>
<id>urn:sha1:e991148b00fc683d1591ba27c387c6156d0ee67e</id>
<content type='text'>
If Xapian threw an exception on notmuch_query_count_messages the count
variable could be used uninitialized.  Initialize count to solve the
problem.

Signed-off-by: Jeffrey C. Ollie &lt;jeff@ocjtech.us&gt;
</content>
</entry>
<entry>
<title>lib/messages.c: Make message searches stream as well.</title>
<updated>2009-11-24T19:33:09Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-24T05:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=70962fabf9c57cda5af26c28894fc9371fd085f2'/>
<id>urn:sha1:70962fabf9c57cda5af26c28894fc9371fd085f2</id>
<content type='text'>
Xapian provides an interator-based interface to all search results.
So it was natural to make notmuch_messages_t be iterator-based as
well. Which we did originally.

But we ran into a problem when we added two APIs, (_get_replies and
_get_toplevel_messages), that want to return a messages iterator
that's *not* based on a Xapian search result. My original compromise
was to use notmuch_message_list_t as the basis for all returned
messages iterators in the public interface.

This had the problem of introducing extra latency at the beginning
of a search for messages, (the call would block while iterating over
all results from Xapian, converting to a message list).

In this commit, we remove that initial conversion and instead provide
two alternate implementations of notmuch_messages_t (one on top of a
Xapian iterator and one on top of a message list).

With this change, I tested a "notmuch search" returning *many* results
as previously taking about 7 seconds before results started appearing,
and now taking only 2 seconds.
</content>
</entry>
<entry>
<title>lib/query: Drop the first and max_messages arguments from search_messages.</title>
<updated>2009-11-24T04:25:13Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-24T04:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=94eb9aacd40a8aa133f64bbe5ed71c0138fb5ed9'/>
<id>urn:sha1:94eb9aacd40a8aa133f64bbe5ed71c0138fb5ed9</id>
<content type='text'>
These only existed to support the chunky-searching hack, but that
was recently dropped anyway.
</content>
</entry>
<entry>
<title>lib/query: Fix notmuch_threads_t to stream results rather than blocking.</title>
<updated>2009-11-24T04:18:57Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-24T04:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ba3554b8045e16ae883d559b7e575e8aca00f6d2'/>
<id>urn:sha1:ba3554b8045e16ae883d559b7e575e8aca00f6d2</id>
<content type='text'>
Previously, notmuch_query_search_threads would do all the work, so the
caller would block until all results were processed. Now, we do the
work as we go, as the caller iterates with notmuch_threads_next. This
means that once results start coming back from "notmuch search" they
just keep continually streaming.

There's still some initial blocking before the first results appear
because the notmuch_messages_t object has the same bug (for now).
</content>
</entry>
</feed>
