summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Carl Worth [Wed, 14 Oct 2009 15:02:27 +0000 (08:02 -0700)]
Factor out parsing of reference-header values and pickup In-reply-to.
This is in preparation for doing a couple of passes over the references,
(one to add terms to the database, and a second to find the thread_id).
We also now parse the In-reply-to header which we were missing before.
We treat it identically to the References header.
Carl Worth [Wed, 14 Oct 2009 14:24:28 +0000 (07:24 -0700)]
notmuch-index-message: Ignore more signature patterns.
Getting more sup-compatible all the time.
Carl Worth [Wed, 14 Oct 2009 04:13:23 +0000 (21:13 -0700)]
notmuch-index-message: Avoid crashing when a message has no references.
It's obviously an innocent-enough message, and the right thing is
so easy to do.
Carl Worth [Wed, 14 Oct 2009 04:11:54 +0000 (21:11 -0700)]
notmuch-index-message: Read message filenames from stdin
This allows for indexing an arbitrary number of messages with a
single invocation rather than just a single message on the command
line.
Carl Worth [Wed, 14 Oct 2009 03:42:08 +0000 (20:42 -0700)]
Move index_file out from main() into its own function.
This is a step toward having a program that will index many messages
with a single invocation.
Carl Worth [Wed, 14 Oct 2009 01:43:26 +0000 (18:43 -0700)]
notmuch-index-message: Index References as well.
We're basically matching sup now! (As long as one uses sup with my
special notmuch_index.rb file).
Carl Worth [Wed, 14 Oct 2009 01:16:43 +0000 (18:16 -0700)]
Minor code re-ordering for clarity.
Pull the "constant" source_id value out from among several calls
that set a value based on the Message ID.
Carl Worth [Wed, 14 Oct 2009 00:01:43 +0000 (17:01 -0700)]
notmuch-index-message: Don't index the "re:" prefix in subjects.
Getting closer to sup results all the time.
Carl Worth [Tue, 13 Oct 2009 23:52:12 +0000 (16:52 -0700)]
notmuch-index-message: Don't index the line introducing a quote.
We identify it based on a trailing ':' on the line before a quote
begins.
At this point the database-dump diff between sup and notmuch is
getting very, very small, (at least for our one test message).
Carl Worth [Tue, 13 Oct 2009 23:09:54 +0000 (16:09 -0700)]
notmuch-index-message: Don't index quoted lines and signatures.
At this point, we're achieving a result that is *very* close to
what sup does. The only difference is that we are still indexing
the "excerpts from message ..." line, and we are not yet indexing
references.
Carl Worth [Tue, 13 Oct 2009 23:03:01 +0000 (16:03 -0700)]
notmuch-index-message: Separate gen_terms_body into its own function
This one is complex enough to deserve its own treament.
Carl Worth [Tue, 13 Oct 2009 22:56:16 +0000 (15:56 -0700)]
notmuch-index-message: Add code to actually create a Xapian index
Most of this code is fairly clean and works well. One part is
fairly painful---namely extracting the body of an email message
from libgmime. Currently, I'm just extracting the offset to
the end of the headers, and then separately opening the message.
Surely there's a better way.
Anyway, with that the results are looking very similar to sup-sync
now, (as verified by xapian-dump). The only substantial difference
I'm seeing now is that sup does not seem to index quoted portions
of messages nor signatures. I'm not actually sure whether I want
to follow sup's lead in that or not.
Carl Worth [Tue, 13 Oct 2009 20:28:13 +0000 (13:28 -0700)]
Rename g_mime_test to notmuch-index-message
In preparation for actually creating a Xapian index from the
message, (not that we're doing that quite yet).
Carl Worth [Tue, 13 Oct 2009 20:21:47 +0000 (13:21 -0700)]
xapian-dump: Add a little mor indentation
Just to make it easier to visually identify where one document ends
and the next begins.
Carl Worth [Tue, 13 Oct 2009 20:18:32 +0000 (13:18 -0700)]
Include document data in the dump.
At the same time, I've started hacking up sup with a new NotmuchIndex
class in the place of the previous XapianIndex class. The new class
stores only the source_info field in the document data, (rather than
a serialized ruby hash with a bunch of data that can be found in the
original message).
Eventually, I plan to replace source_info with a relative filename for
the message, (or even a list of filenames for when multiple messages
in the database share a common message ID).
Carl Worth [Tue, 13 Oct 2009 16:36:25 +0000 (09:36 -0700)]
xapian-dump: Add support to unserialize values.
The interface for this is cheesy, (bare integer value numbers on the
command line indicating that unserialization is desired for those
value numbers). But this at least lets us print sup databases with
human-readable output for the date values.
Carl Worth [Tue, 13 Oct 2009 15:57:02 +0000 (08:57 -0700)]
Add .gitignore file to ignore compiled binaries.
Carl Worth [Tue, 13 Oct 2009 15:50:20 +0000 (08:50 -0700)]
xapian-dump: Add values to the dump as well.
Carl Worth [Tue, 13 Oct 2009 15:29:59 +0000 (08:29 -0700)]
xapian-dump: Fix to dump all terms for each document ID.
Carl Worth [Tue, 13 Oct 2009 15:20:36 +0000 (08:20 -0700)]
xapian-dump: Actually dump document IDs
It's not a complete tool yet, but it at least does something now.
Carl Worth [Tue, 13 Oct 2009 14:51:11 +0000 (07:51 -0700)]
Remove unused variable.
Compiling with -Wall considered useful.
Carl Worth [Tue, 13 Oct 2009 14:50:04 +0000 (07:50 -0700)]
Add the beginnings of a xapian-dump program.
This will (when it is finished) make a much more reliable way to
ensure that notmuch's sync program behaves identically to sup-sync.
It doesn't actually do anything yet.
Carl Worth [Tue, 13 Oct 2009 14:23:14 +0000 (07:23 -0700)]
Add sup-compatible prefixes and achieve sup-compatible print output
What I've done here is to instrument sup-sync to print the text
and terms objects it constructs just before indexing a message.
Then I've made my g_mime_test program achieve (nearly) identical
output for an example email message, (just missing the body
text). Next we can start shoving this data into a Xapian index.
Carl Worth [Mon, 12 Oct 2009 22:50:02 +0000 (15:50 -0700)]
Initial commit of a test program to form the basis of notmuch.
Basically just playing with some simple code using libgmime to parse
an email message.