<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/query.cc, branch debian-0.1-1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian-0.1-1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian-0.1-1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2010-03-09T17:22:29Z</updated>
<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>
<entry>
<title>notmuch search: Remove the chunked-searching hack.</title>
<updated>2009-11-24T04:17:37Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-24T04:12:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=1fd8b7866f189a66e4491b01452f476371759f91'/>
<id>urn:sha1:1fd8b7866f189a66e4491b01452f476371759f91</id>
<content type='text'>
This was a poor workaround around the fact that the existing
notmuch_threads_t object is implemented poorly. It's got a fine
iterartor-based interface, but the implementation does all of the
work up-front in _create rather than doing the work incrementally
while iterating.

So to start fixing this, first get rid of all the hacks we had working
around this. This drops the --first and --max-threads options from the
search command, (but hopefully nobody was using them
anyway---notmuch.el certainly wasn't).
</content>
</entry>
<entry>
<title>Add 'notmuch count' command to show the count of matching messages</title>
<updated>2009-11-23T05:33:54Z</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2009-11-21T07:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=53f8cc565126db4a003dbfc02850d2bf3b260636'/>
<id>urn:sha1:53f8cc565126db4a003dbfc02850d2bf3b260636</id>
<content type='text'>
Getting the count of matching threads or messages is a fairly
expensive operation. Xapian provides a very efficient mechanism that
returns an approximate value, so use that for this new command.

This returns the number of matching messages, not threads, as that is
cheap to compute.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
</content>
</entry>
<entry>
<title>Catch and optionally print about exception at database-&gt;flush.</title>
<updated>2009-11-22T02:54:20Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-22T02:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2341cbc09b503f996fd46b68f9d96ae6004025b'/>
<id>urn:sha1:e2341cbc09b503f996fd46b68f9d96ae6004025b</id>
<content type='text'>
If an earlier exception occurred, then it's not unexpected for the
flush to fail as well. So in that case, we'll silently catch the
exception. Otherwise, make some noise about things going wrong at the
time of flush.
</content>
</entry>
<entry>
<title>Print information about where Xapian exception occurred.</title>
<updated>2009-11-22T02:51:35Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2009-11-22T02:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=591f901241623fbc50b67dbcff88c68cb33c53fd'/>
<id>urn:sha1:591f901241623fbc50b67dbcff88c68cb33c53fd</id>
<content type='text'>
Previously, our Xapian exception reports where identical so they
were hard to track down.
</content>
</entry>
</feed>
