storing From and Subject in xapian
servilio
servilio at gmail.com
Sat May 14 21:40:19 PDT 2011
On 12 May 2011 04:39, Istvan Marko <notmuch at kismala.com> wrote:
> Stewart Smith <stewart at flamingspork.com> writes:
>
>> Would it be possible to progressively fill the DB with the new data?
>>
>> i.e.
>>
>> if Subject/From not in db for message
>> add Subject/From for this message to DB.
>
> I started looking into this but then realized that notmuch search opens
> the database in read-only mode so it cannot make updates. It might be
> desirable to keep it that way for safety and locking reasons.
What about the following:
- increase NOTMUCH_DATABASE_VERSION[1]
- update notmuch_database_upgrade[2] to fill in the new data for the
documents missing it
- include an upgradedb command that wraps notmuch_database_upgrade[2]
- have notmuch search prints a warning about running a DB version less
than the runtime and suggests running upgradedb
Regards,
Servilio
[1] http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/database.cc#l39
[2] http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/database.cc#l765
More information about the notmuch
mailing list