On Thu, Apr 19, 2007 at 07:37:04AM +0100, Mark Clarkson
wrote:> Is there a simple way to change a single term (not posting) for a
> document that is already in the database? I've tried using
> replace_document where only a single term changes but it is very slow.
That's the only way.
Note that this isn't an inherently slow operation though - the Document
class could track which (if any) terms have actually been modified and
leave the rest alone, but currently this optimisation hasn't been
implemented - it's not been a case anyone has been concerned about the
performance of before, as far as I can recall.
I suggest filing a wishlist bug about this (unless you feel up to
implementing it yourself, in which case I can point you in the right
direction). Our bug tracker is at:
http://www.xapian.org/bugs.php
Cheers,
Olly