Reimplement Xapian::MSet
commit27d8cd02d10a68cb3bfccecf160e525f6aea92dd
authorOlly Betts <olly@survex.com>
Thu, 28 Sep 2017 03:32:09 +0000 (28 16:32 +1300)
committerOlly Betts <olly@survex.com>
Fri, 29 Sep 2017 04:08:17 +0000 (29 17:08 +1300)
tree5de4952aa0a96cd43806313879a125a0454db4b0
parent5dc9c91d373460f9eb5a1dd72219c0e4c58bb614
Reimplement Xapian::MSet

get_termfreq() and get_termweight() now just return 0 rather than
throwing exceptions when called on a default-constructed MSet, which
is makes it easier to use such an MSet as a placeholder for an empty
search.

get_termweight() also now returns zero when called on a term which
wasn't in the query rather than throwing an exception - this seems
logical as such terms don't contribute weight to any documents in
the MSet.
20 files changed:
xapian-core/api/Makefile.mk
xapian-core/api/mset.cc [new file with mode: 0644]
xapian-core/api/msetinternal.h [new file with mode: 0644]
xapian-core/api/msetiterator.cc
xapian-core/api/omenquire.cc
xapian-core/api/omenquireinternal.h
xapian-core/api/result.h
xapian-core/backends/database.cc
xapian-core/backends/database.h
xapian-core/backends/remote/remote-database.cc
xapian-core/include/xapian/mset.h
xapian-core/matcher/msetpostlist.h
xapian-core/matcher/multimatch.cc
xapian-core/matcher/remotesubmatch.cc
xapian-core/net/remoteserver.cc
xapian-core/net/serialise.cc
xapian-core/net/serialise.h
xapian-core/queryparser/termgenerator_internal.cc
xapian-core/tests/api_anydb.cc
xapian-core/tests/api_nodb.cc