[Xapian-discuss] replace_document and delete_document with string UID not working in PHP bindings?

Pascal Opitz contact at pascalopitz.com
Mon Oct 26 23:26:55 GMT 2009


Hello,

new to the list, but I couldn't find info on this by using the search.

I am currently trying to index documents using the replace_document  
method, and am passing a string instead of a docid:

$this->xapian_write_db->replace_document((string)  
self::XAPIAN_PREFIX_UNIQUE . $row['item_guid'], $doc);

In this example, the term will end up as 'Q' plus a guid like  
'1744e18c4d37c8294d5a682e885c13dc'.

If I run this again, the document gets added again, and not replaced,  
and I end up with multiple matches on the same search term.
Also, when I use delete_document with a string as UID, there seems to  
be no match and my document will still be in place.

Is this a known quirk/bug, and is there a workaround for this, or will  
I have to run a query for the string UID and extract the docid for  
each match?





More information about the Xapian-discuss mailing list