Reimplement the matcher
commitdfc8f93283d19a5a150418586de896df346b8301
authorOlly Betts <olly@survex.com>
Thu, 30 Nov 2017 20:54:24 +0000 (1 09:54 +1300)
committerOlly Betts <olly@survex.com>
Thu, 30 Nov 2017 20:54:24 +0000 (1 09:54 +1300)
treef126c1c78412f7fe0110d2f6dd8e5a891b3575ad
parent1253d79db95d99a0ab01196c5a1229f54479ea21
Reimplement the matcher

The new implementation handles remote databases by merging MSet objects
rather than feeding them into the standard matcher via MSetPostList.

A custom heap implementation is used, which provides a "replace"
operation - this probably addresses slow collapsing as reported by
Gareth Rees (ticket #682).

There's currently one limitation which wasn't present before - using
collapsing and a percentage cut-off together isn't supported in all
cases, and may throw FeatureUnavailableError.  There's no test coverage
for this case currently, so the testsuite passes.  I plan to address
this limitation (and lack of test coverage) in the near future.
38 files changed:
xapian-core/api/enquire.cc
xapian-core/api/enquireinternal.h
xapian-core/api/mset.cc
xapian-core/api/msetinternal.h
xapian-core/api/postlist.cc
xapian-core/api/postlist.h
xapian-core/api/result.h
xapian-core/backends/multi/multi_database.h
xapian-core/backends/remote/remote-database.cc
xapian-core/backends/remote/remote-database.h
xapian-core/common/Makefile.mk
xapian-core/common/stdclamp.h [new file with mode: 0644]
xapian-core/common/submatch.h [deleted file]
xapian-core/include/xapian/mset.h
xapian-core/matcher/Makefile.mk
xapian-core/matcher/collapser.cc
xapian-core/matcher/collapser.h
xapian-core/matcher/extraweightpostlist.cc
xapian-core/matcher/heap.h [new file with mode: 0644]
xapian-core/matcher/localsubmatch.cc
xapian-core/matcher/localsubmatch.h
xapian-core/matcher/matcher.cc [new file with mode: 0644]
xapian-core/matcher/matcher.h [new file with mode: 0644]
xapian-core/matcher/mergepostlist.cc [deleted file]
xapian-core/matcher/mergepostlist.h [deleted file]
xapian-core/matcher/msetcmp.cc
xapian-core/matcher/msetpostlist.cc [deleted file]
xapian-core/matcher/msetpostlist.h [deleted file]
xapian-core/matcher/multimatch.cc [deleted file]
xapian-core/matcher/multimatch.h [deleted file]
xapian-core/matcher/postlisttree.h
xapian-core/matcher/protomset.h [new file with mode: 0644]
xapian-core/matcher/remotesubmatch.cc
xapian-core/matcher/remotesubmatch.h
xapian-core/matcher/spymaster.h
xapian-core/net/remote_protocol.rst
xapian-core/net/remoteserver.cc
xapian-maintainer-tools/xapian-check-patch