[Xapian-commits] 11838: trunk/xapian-core/ trunk/xapian-core/api/ trunk/xapian-core/common/ trunk/xapian-core/include/xapian/ trunk/xapian-core/matcher/ trunk/xapian-core/net/ trunk/xapian-core/tests/

richard xapian-commits at lists.xapian.org
Mon Feb 16 11:05:33 GMT 2009


SVN root:       svn://svn.xapian.org/xapian
Changes by:     richard
Revision:       11838
Date:           2009-02-16 11:05:33 +0000 (Mon, 16 Feb 2009)

Log message (32 lines):
Add support for multi and remote backends with posting sources,
from ticket #295:
include/xapian/postingsource.h: Add some clarifying comments
about the interface of PostingSources, and add clone(), name(),
serialise() and unserialise() methods to PostingSources, for
remote and multidatabase support.
include/xapian/query.h: Add internal member to track ownership of
external posting sources, and update some comments.
api/postingsource.cc: Add implementations of the new methods, so
that all standard PostingSources support remote and multi
database searches.
api/omquery.cc: Clone external PostingSources if possible.
api/omqueryinternal.cc: Add serialisation and unserialisation
support for posting sources, and support for keeping track of
whether an external posting source is owned by the query object
or not (ie, whether it needs to be deleted by the destructor).
matcher/externalpostlist.cc,matcher/externalpostlist.h: (Attempt
to) clone external posting sources at start, and call the reset()
method with the database in use.  Delete the posting source
afterwards, if the clone was successful.
matcher/queryoptimiser.cc: Pass the database to ExternalPostList.
Sadly, this currently requires a const_cast.
tests/: Update tests of PostingSources to take the db parameter
on the reset() method, and to test behaviour with multi and
remote backends where appropriate.  Also, add regression test for
segfault in FixedWeightPostingSource::skip_to() when database is
empty.
net/remoteserver.cc,common/remoteserver.h: Add the built-in
posting sources to the remote server, and add
register_posting_source() to the remoteserver, for use in
xapian-tcpsrv.cc for user posting sources, analogously to
register_weighting_scheme().

Modified files:
U   trunk/xapian-core/ChangeLog
U   trunk/xapian-core/api/omquery.cc
U   trunk/xapian-core/api/omqueryinternal.cc
U   trunk/xapian-core/api/postingsource.cc
U   trunk/xapian-core/common/remoteserver.h
U   trunk/xapian-core/include/xapian/postingsource.h
U   trunk/xapian-core/include/xapian/query.h
U   trunk/xapian-core/matcher/externalpostlist.cc
U   trunk/xapian-core/matcher/externalpostlist.h
U   trunk/xapian-core/matcher/queryoptimiser.cc
U   trunk/xapian-core/net/remoteserver.cc
U   trunk/xapian-core/tests/api_db.cc
U   trunk/xapian-core/tests/api_percentages.cc
U   trunk/xapian-core/tests/api_valuestream.cc
U   trunk/xapian-core/tests/internaltest.cc

Links:
http://xapian.org/C?11838
http://xapian.org/C?11838?trunk/xapian-core/ChangeLog
http://xapian.org/C?11838?trunk/xapian-core/api/omquery.cc
http://xapian.org/C?11838?trunk/xapian-core/api/omqueryinternal.cc
http://xapian.org/C?11838?trunk/xapian-core/api/postingsource.cc
http://xapian.org/C?11838?trunk/xapian-core/common/remoteserver.h
http://xapian.org/C?11838?trunk/xapian-core/include/xapian/postingsource.h
http://xapian.org/C?11838?trunk/xapian-core/include/xapian/query.h
http://xapian.org/C?11838?trunk/xapian-core/matcher/externalpostlist.cc
http://xapian.org/C?11838?trunk/xapian-core/matcher/externalpostlist.h
http://xapian.org/C?11838?trunk/xapian-core/matcher/queryoptimiser.cc
http://xapian.org/C?11838?trunk/xapian-core/net/remoteserver.cc
http://xapian.org/C?11838?trunk/xapian-core/tests/api_db.cc
http://xapian.org/C?11838?trunk/xapian-core/tests/api_percentages.cc
http://xapian.org/C?11838?trunk/xapian-core/tests/api_valuestream.cc
http://xapian.org/C?11838?trunk/xapian-core/tests/internaltest.cc



More information about the Xapian-commits mailing list