Drop support for pre-1.4 Xapian, prepare for 1.5.x
David Bremner
david at tethera.net
Sun Apr 21 07:43:19 PDT 2019
David Bremner <david at tethera.net> writes:
> David Bremner <david at tethera.net> writes:
>
>> The current development release of Xapian drops several deprecated
>> APIs. This hampers testing of notmuch against Xapian master (i.e. to
>> see if a problem has been fixed). This series fixes most of the
>> incompatibilities.
>>
>> The one thing this series doesn't handle is test/T530-upgrade.sh,
>> which mostly fails because Xapian 1.5 / master drops support for
>> Chert. I think that we should probably deprecate support for notmuch
>> v1 databases. These were replaced by version 2 in 2010. I think more
>> thought is probably needed for this migration so I left those failing
>> tests for now. This isn't quite as scary as it sounds, because we
>> really only support stable releases of Xapian, so the chert removal
>> effectively won't happen until 1.6.
>>
>
> I forgot, there's one other failing test with xapian 1.5
>
> T650-regexp-query: Testing regular expression searches
> FAIL null from: search
> --- T650-regexp-query.7.EXPECTED 2019-04-15 11:03:10.128070898 +0000
> +++ T650-regexp-query.7.OUTPUT 2019-04-15 11:03:10.128070898 +0000
> @@ -1 +0,0 @@
> -thread:XXX 2001-01-05 [1/1] -; empty from (inbox unread)
I'm continuing to investigate this. The following program finds one
result (in tmp.T650-regexp-query) in 1.4 and 0 results in Xapian
master. I'd give about 50% odds that I'm just doing something silly.
#include <xapian.h>
#include <iostream>
int main(int argc, char **argv) {
Xapian::Database db("mail/.notmuch/xapian");
Xapian::Query query(Xapian::Query::OP_AND_NOT,
Xapian::Query("Tmail"),
Xapian::Query(Xapian::Query::OP_WILDCARD, "XFROM", 0,
Xapian::Query::WILDCARD_LIMIT_ERROR, Xapian::Query::OP_SYNONYM));
Xapian::Enquire enquire(db);
enquire.set_query(query);
Xapian::MSet mset = enquire.get_mset(0,1000000);
std::cout << "mset " << mset.get_description() << std::endl;
for (auto i = mset.begin(); i != mset.end(); ++i) {
std::cout << (*i) << std::endl;
}
}
More information about the notmuch
mailing list