[Xapian-discuss] Re: Easy deletion of documents?
Ted Jordan
ted at qtis.co.nz
Wed Jan 4 05:04:47 GMT 2006
Olly Betts <olly <at> survex.com> writes:
>
> Just add the filename as a term to each document (with a prefix to
> distinguish it from terms from text - "Q" is the usual prefix for
> such uniQue terms, but nothing in the core library relies on this.
>
> Then you can directly call delete_document or replace_document with a
> termname instead of a document id.
I have an index prefix 'extid:' which has worked well so far for indexing and
searching. I tried to use it for deletion (using PHP) e.g.
WritableDatabase_delete_document($database, 'extid:1367');
but I get the following error:
Fatal error: InvalidArgumentError: Document ID 0 is invalid
Any ideas?
Thanks,
-Ted.
More information about the Xapian-discuss
mailing list