[Xapian-discuss] Writing with xapian-tcpsrv and php

Olly Betts olly at survex.com
Fri Dec 1 02:44:18 GMT 2006


On Wed, Nov 29, 2006 at 09:23:46AM +0100, kef wrote:
> I still can't use remote writing. More than this, I can't even use
> get_lastdocid() method.
> 
> $db = remote_open_writable(localhost, 4006);
> $db->get_lastdocid(); //Fatal error: unknown error in Xapian in (..)

The get_lastdocid() method isn't implemented for the remote backend yet.
I've updated the bug which tracks the missing methods to include this
to make sure it gets fixed when I have time to fix that bug:

http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=38

> $db->replace_document($doc_id, $doc); //Fatal error: No matching
> function for overloaded 'XapianWritableDatabase_replace_document' in
> (...)

This probably means that $doc_id isn't an integer.  Note that it needs
to be an actual PHP integer, not a PHP string containing an integer.  If
$doc_id could be a string use intval(docid) to force it to be an integer.

Cheers,
    Olly



More information about the Xapian-discuss mailing list