[Xapian-discuss] Updating existing documents

Richard Boulton richard at lemurconsulting.com
Sun May 17 15:40:11 BST 2009


2009/5/17 Ivo Jansch - Ibuildings <ivo at ibuildings.nl>:
> hi,
>
> this maybe a very newbie question, but couldn't find it in the docs;
> I've built my spider and run it a few times, but every document is now
> in the index multiple times. While there is a get_id on Documents, I can
> see no set_id; how do I tell it that it's indexing an existing doc when
> I index a document?

Use replace_document() instead of add_document() - this allows you to
specify the id.

-- 
Richard



More information about the Xapian-discuss mailing list