[Xapian-devel] Re: writabledatabase_delete_document()
Olly Betts
olly at survex.com
Mon Dec 4 23:35:04 GMT 2006
On Mon, Dec 04, 2006 at 11:54:54AM -0800, Alexander Lind wrote:
> Should I make it so all deletes are done by themselves, ie without
> updates interwoven?
It shouldn't make much difference, though I've never benchmarked it.
> But that of course was because I was passing the docid as a string, not
> an int. Smart eh? :p
That would cause a lot of work for smallish docids, as smallish numbers
are generally pretty common so this will be trying to delete a lot of
documents for every call to delete_document.
Perhaps this int/string overload in the PHP bindings is too much of a
"gotcha", since it's unusual to distinguish between a number and a
string of a number in PHP. We could instead wrap the two different
forms of delete_document (and replace_document) under different names.
> Question: how do you merge the sub-db:s in the end, for the search
> functions?
Use xapian-compact (or quartzcompact for quartz). It merges the tables
at a low level, so it's pretty quick.
Cheers,
Olly
More information about the Xapian-devel
mailing list