[Xapian-discuss] Problems with positions and replace_document

Olly Betts olly at survex.com
Sun Nov 12 05:12:47 GMT 2006


On Sat, Nov 11, 2006 at 11:08:16AM +0000, Olly Betts wrote:
> But I don't see that this double call could cause the problem, so I
> think your patch probably just avoids the bug manifesting rather than
> fixing it completely.

Upon further inspection, I see this is actually a correct fix - the key
thing is to create the PositionIterator before we delete the old
positional information.  Sorry for not seeing that before.

But in fact we only need to explicitly delete it if we don't have new
positional information - if we're replacing the positional information
it will just overwrite any old information so we can save a Btree
operation here.

Quartz has the same problem and InMemory a very similar one, which I've
produced fixes for.  The remote backend works fine (once the database
being used by the remote end is fixed).

Cheers,
    Olly



More information about the Xapian-discuss mailing list