<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/query.cc, branch 0.10</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.10</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.10'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2011-11-15T23:12:32Z</updated>
<entry>
<title>lib: add function to get the number of threads matching a search</title>
<updated>2011-11-15T23:12:32Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2011-11-15T20:08:48Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=00c60fbcb3b2b7c9f90c36e4dfb9393fdf678735'/>
<id>urn:sha1:00c60fbcb3b2b7c9f90c36e4dfb9393fdf678735</id>
<content type='text'>
Add function notmuch_query_count_threads() to get the number of threads
matching a search. This is done by performing a search and figuring out the
number of unique thread IDs in the matching messages, a significantly
heavier operation than notmuch_query_count_messages().

Signed-off-by: Jani Nikula &lt;jani@nikula.org&gt;
</content>
</entry>
<entry>
<title>Mark some structures in the library interface with visibility=default attribute.</title>
<updated>2011-05-11T20:27:15Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2011-05-11T20:23:13Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d5523ead90b6be2b07d4af745b8ed9b980a6b9f1'/>
<id>urn:sha1:d5523ead90b6be2b07d4af745b8ed9b980a6b9f1</id>
<content type='text'>
As of gcc 4.6, there are new warnings from -Wattributes along the lines of:

	warning: ‘_notmuch_messages’ declared with greater visibility
	than the type of its field ‘_notmuch_messages::iterator’
	[-Wattributes]

To squelch these, we decorate all such containing structs with
__attribute__((visibility("default"))). We take care to let only the
C++ compiler see this, (since the C compiler would otherwise warn
about ignored visibility attributes on types).
</content>
</entry>
<entry>
<title>Simplify _notmuch_doc_id_set_init interface.</title>
<updated>2011-01-31T02:01:56Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-01-31T02:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=56d19273fe6820907b6800cf391c8b2cb94ab86d'/>
<id>urn:sha1:56d19273fe6820907b6800cf391c8b2cb94ab86d</id>
<content type='text'>
Don't require the caller of _notmuch_doc_id_set_init to pass in a
correct bound; instead compute it from the array.  This simplifies the
caller and makes this interface easier to use correctly.
</content>
</entry>
<entry>
<title>Remove code repetition in the doc ID bitmap code.</title>
<updated>2011-01-31T01:58:27Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@mit.edu</email>
</author>
<published>2011-01-31T01:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e04e72f9dd9b435f37cf9e712d9e23cf22896e27'/>
<id>urn:sha1:e04e72f9dd9b435f37cf9e712d9e23cf22896e27</id>
<content type='text'>
Remove the repeated "sizeof (doc_ids-&gt;bitmap[0])" that bothered cworth
by instead defining macros to compute the word and bit offset of a
given bit in the doc ID set bitmap.
</content>
</entry>
<entry>
<title>Optimize thread search using matched docid sets.</title>
<updated>2010-12-08T00:40:05Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2010-11-17T19:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b3caef1f0659dac8183441357c8fee500a940889'/>
<id>urn:sha1:b3caef1f0659dac8183441357c8fee500a940889</id>
<content type='text'>
This reduces thread search's 1+2t Xapian queries (where t is the
number of matched threads) to 1+t queries and constructs exactly one
notmuch_message_t for each message instead of 2 to 3.
notmuch_query_search_threads eagerly fetches the docids of all
messages matching the user query instead of lazily constructing
message objects and fetching thread ID's from term lists.
_notmuch_thread_create takes a seed docid and the set of all matched
docids and uses a single Xapian query to expand this docid to its
containing thread, using the matched docid set to determine which
messages in the thread match the user query instead of using a second
Xapian query.

This reduces the amount of time required to load my inbox from 4.523
seconds to 3.025 seconds (1.5X faster).
</content>
</entry>
<entry>
<title>lib: Eliminate some redundant includes of xapian.h</title>
<updated>2010-11-02T06:24:40Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-11-02T05:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d064bd696ccc443a7ece9cfc8816999c69943223'/>
<id>urn:sha1:d064bd696ccc443a7ece9cfc8816999c69943223</id>
<content type='text'>
Most files including this already include database-private.h which
includes xapian.h already.
</content>
</entry>
<entry>
<title>lib: Add two functions: notmuch_query_get_query_string and _get_sort</title>
<updated>2010-10-28T17:30:26Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-10-28T17:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e83b40138ef3dd116001a4c53150d0a3274b41c0'/>
<id>urn:sha1:e83b40138ef3dd116001a4c53150d0a3274b41c0</id>
<content type='text'>
It can be handy to be able to query these settings from an existing
query object.
</content>
</entry>
<entry>
<title>lib: Fix notmuch_query_search_threads to return NULL on any Xapian exception.</title>
<updated>2010-10-23T00:56:58Z</updated>
<author>
<name>Carl Worth</name>
<email>cworth@cworth.org</email>
</author>
<published>2010-10-23T00:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f6cb896bc4c0bafca1acd5ac3fb45169cd893e29'/>
<id>urn:sha1:f6cb896bc4c0bafca1acd5ac3fb45169cd893e29</id>
<content type='text'>
Previously, if the underlying search_messages hit an exception and returned
NULL, this function would ignore that and return a non-NULL, (but empty)
threads object. Fix this to properly propagate the error.
</content>
</entry>
<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>
</feed>
