Colin B. Thomas
2005-Aug-19 17:01 UTC
[Xapian-discuss] WritableDatabase::replace_document and PERL
Whenever I try to update a document in our database using the following command (in PERL): $db->replace_document($uniquestring, $document); Where: $db is a Search::Xapian::WritableDatabase object $document is a Search::Xapian::Document object $uniquestring is a string unique to the document being replaced I get the following error: Argument "SEC_ID:0000000003-96-000039" isn't numeric in subroutine entry (SEC_ID:0000000003-96-000039 was the unique string in this case). How do I specify that I want the: WritableDatabase::replace_document(const std::string &unique_term, const Xapian::Document &document) implementation As opposed to: WritableDatabase::replace_document(Xapian::docid did, const Xapian::Document &document) implementation Thanks, Colin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20050819/bd5091ac/attachment.htm
Olly Betts
2005-Aug-20 18:14 UTC
[Xapian-discuss] WritableDatabase::replace_document and PERL
On Fri, Aug 19, 2005 at 12:00:45PM -0400, Colin B. Thomas wrote:> How do I specify that I want the: > > WritableDatabase::replace_document(const std::string &unique_term, const > Xapian::Document &document) implementation > > As opposed to: > > WritableDatabase::replace_document(Xapian::docid did, const > Xapian::Document &document) implementationThe former is wrapped as "replace_document_by_term". Similarly the delete_document variant is "delete_document_by_term". This isn't documented, except in Changes (and the XS source code). I'll fix that. Cheers, Olly