Ivo Jansch - Ibuildings
2009-May-17 14:38 UTC
[Xapian-discuss] Updating existing documents
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? Greetings, Ivo
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