search for: xapianwritabledatabase

Displaying 9 results from an estimated 9 matches for "xapianwritabledatabase".

2006 Oct 19
1
Writing with xapian-tcpsrv and php
Hi, I think, there is missing constructor function supporting remote writing for XapianWritableDatabase class in the php bindings (0.9.7). This code: $db = new XapianWritableDatabase(remote_open($db_host, $db_port), $action); returns: Fatal error: No matching function for overloaded 'new_XapianWritableDatabase' (...) $db = new XapianWritableDatabase($path, $action); works fine. xapian-tcp...
2023 Mar 30
1
Having trouble with php8 bindings
...Handelaar wrote: > It appears that I can't use anything in PHP8.2 if the PHP file from > which I want to access xapian contains a namespace declaration, > because the PHP functions themselves cannot be found. You need to tell PHP to look in the root namespace, e.g.: $test = new \XapianWritableDatabase('searchdb'); Another option is to import the things you want with `use` and then you can just use `XapianWritableDatabase` without to prefix it with `\`. To do that add this after your `namespace literallyanynamespace;` line: use \XapianWritableDatabase; Cheers, Olly
2008 Apr 20
1
Exception DatabaseCorruptError under php
...CorruptError: Failed to unlink /var/lib/xapian/trade.ar/termlist.baseA: No such file or directory' in /usr/share/php5/xapian.php:1140 Stack trace: #0 /usr/share/php5/xapian.php(1140): writabledatabase_add_document(Resource id #18, Object(XapianDocument)) #1 /home/indexer/CDetails.php(431): XapianWritableDatabase->add_document(Object(XapianDocument)) #2 /home/indexer/CDetails.php(379): CDetails->postDetails('E', '2000-01-07', '001', '-1', '4', '200BA', '225', '19059000390', '2514', 'michael kamen concert for saxophone',...
2023 Mar 30
1
Having trouble with php8 bindings
Hello It appears that I can't use anything in PHP8.2 if the PHP file from which I want to access xapian contains a namespace declaration, because the PHP functions themselves cannot be found. (xapian 1.4.22, php8.2, debian bullseye. xapian.so is confirmed to be loaded after manually compiling 1.4.22 packages for libxapian, and compiling the bindings from original source, because it's
2023 Mar 30
1
Having trouble with php8 bindings
On Thu, 30 Mar 2023 at 04:58, Olly Betts <olly at survex.com> wrote: > > Another option is to import the things you want with `use` and then > you can just use `XapianWritableDatabase` without to prefix it with > `\`. To do that add this after your `namespace literallyanynamespace;` > line: > > use \XapianWritableDatabase; Thank you very much. This then (because of course) led to some more things needing tidying up and I've run into something I can't w...
2007 May 15
1
Document ID 0 is invalid... but not always...
...and return 0 for the newly created record. In fact, I was "hacking", trying to store metadata in a "special" record with docId "-1"... I know, this is bad, but what is interesting is what xapian does in such a situation... Here is a simple PHP test : $db=new XapianWritableDatabase('pathtodb', Xapian::DB_CREATE_OR_OVERWRITE); $doc=new XapianDocument(); $doc->set_data('metadata'); // waiting for http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=143 $doc->add_term('metadata'); $db->replace_document(-1, $doc); // o...
2007 Dec 13
2
backing up a database by locking while backup program runs
...nks to it from the Xapian website. (The following Google query finds nothing: "link:www.xapian.org/docs/admin_notes.html".) [1] http://www.xapian.org/docs/admin_notes.html I propose to use a simple PHP script like the following in order to obtain the write lock: <?php $h = new XapianWritableDatabase("/my/Xapian/database", DB_OPEN); sleep(99999); Regards, Ronan.
2010 Oct 21
2
In-memory databases vs PHP Bindings
...ts); $xenq->set_query(new XapianQuery("UIDpost".$postid)); $xdoc = $xenq->get_mset(0, 1)->begin()->get_document(); // Create a database that just contains the one document // TODO:AB:20101020: Work out how to build an in-memory Xapian database via PHP bindings $xdb_doc = new XapianWritableDatabase(PROJROOT.'/tmp/xapian/doc'.$postid, Xapian::DB_CREATE_OR_OVERWRITE); $xdb_doc->add_document($xdoc); $xdb_doc->commit(); Also, FYI, the documentation here seems incomplete: http://xapian.org/docs/apidoc/html/classXapian_1_1TermIterator.html I had to inspect the bindings to find the...
2008 Aug 19
1
Fwd: Strange error with PHP bindings [some more details]
Finally I noticed something suspect: [2008-08-19 09:11:25] [DEBUG] DAO_Articles::add_xindex() - document added id : 255, title : Gli anelli con sigil... this is a debug line from my application, add_xindex function simply adds the document to xapian database, the error always happens when I try to add an article with id = 255, this can not be a casualty (I also tried to change the order of