[Xapian-discuss] Is there any good way to delete many documents in Xapian Indexed data?

Olly Betts olly at survex.com
Fri Oct 17 04:02:22 BST 2008


On Fri, Oct 17, 2008 at 01:50:48AM +0800, Hightman(??????) wrote:
> Sometimes, I should delete a lot of documents from xapian indexed data, 
> 
> I had to call the  WritableDatabase::delete_document() by a fake
> unique_term, becuase this term refer to many documents rather than
> only one document.
> 
> But this operator will take for a long time even failed. So, I am
> finding a better way to solved this problem, can you help me?

It is inherently a lot of work to delete a lot of documents as we need
to update the posting lists for all the terms they contain.  The work
is comparable to what would be required to add the same documents.

If this is failing, that sounds like a bug, but I need details before
I can usefully comment on that...

Cheers,
    Olly



More information about the Xapian-discuss mailing list