[Xapian-discuss] replace_document issue
Michael Lewis
mal at icginc.com
Tue Apr 30 13:42:13 BST 2013
Thanks guys, I'll try that.
Michael
-----Original Message-----
From: Olly Betts [mailto:olly at survex.com]
Sent: Tuesday, April 30, 2013 8:34 AM
To: Michael Lewis
Cc: Xapian Discussion
Subject: Re: [Xapian-discuss] replace_document issue
On Tue, Apr 30, 2013 at 07:15:19AM -0500, Michael Lewis wrote:
> $docid=$database->replace_document($rid,$doc);
[...]
> I was under the impression that using the replace_document() function
> allowed me to set the document ID. Am I wrong or what am I doing
> wrong?
In C++, there are two versions of replace_document() - one takes a docid, while the other takes a term (so you can easily replace a document by a unique key). From PHP which you get depends if you pass a string or integer, so you probably want to use:
$docid=$database->replace_document(intval($rid),$doc);
Cheers,
Olly
More information about the Xapian-discuss
mailing list