[Xapian-discuss] Deleting documents with scriptindex

Olly Betts olly at survex.com
Thu Jun 18 17:08:04 BST 2009


On Thu, Jun 18, 2009 at 11:24:14AM -0400, Jason Chapin wrote:
> I can't seem to find an answer for this, or I'm going about it wrong. 
> The situation is this, I use scriptindex on a dump of MySQL product data 
> to update the Xapian database. The product catalog updates about once a 
> month, wherein existing products can be updated or deleted and new 
> products added.

If you feed scriptindex a record which only specifies a unique id then
it will remove any record with that unique id (documented in
scriptindex.html under the unique action).

> Would it be best to just delete the database and rebuild it for each
> product update?

That would work too.  If most products change then it's probably quicker
to just rebuild from scratch.

Cheers,
    Olly



More information about the Xapian-discuss mailing list