search for: xapiandatabase

Displaying 10 results from an estimated 10 matches for "xapiandatabase".

2007 May 23
1
Debian etch packages of php5-xapians have old style flat function interface
...ocumentation ii xapian-examples 0.9.9-1 Xapian simple example programs ii xapian-tools 0.9.9-1 Basic tools for Xapian search engine library If I use PHP4, things are fine. When I use PHP5, I get "Class 'XapianDatabase' not found" errors. Upon closer inspection using phpinfo(), get_declared_classes() and get_defined_functions() I find that: 1) phpinfo says the Xapian module is loaded, version 0.9.9 2) The old style flat functions like new_database are there 3) The new style classes (XapianDatabase etc.)...
2011 Jan 17
2
DatabaseCorruptError
Hi there, My web app uses Xapian via the PHP bindings. I'm getting this error thrown occasionally when atempting to instantiate a XapianDatabase object for searching. DatabaseCorruptError: Expected block 107 to be level 1, not 0 Here's the line that invokes it: $database = new XapianDatabase(PROJROOT.'/data/xapian/posts'); And my version is xapian-core 1.2.3 with matchspy. Any ideas? Is it likely to be because the index...
2011 Feb 11
2
PHP Binding and SWIG Director for XapianMatchDecider
Hi, I try to use XapianMatchDecider to filtering results, but the code : $Decider = new MatchDecider_Search($XapianDatabase->_cPtr); $mset = $XapEnquire->get_mset(0, 3000, null, $Decider); Always return : PHP Fatal error: No matching function for overloaded 'Enquire_get_mset' in xapian.php on line 1082 I saw that SWIG was not supporting Directors for PHP, but now, it seems to be patched. Why is it sti...
2010 Jan 16
1
PHP XapianTermIterator/XapianPositionIterator usage
Hello again, /thanks to Peter for previous response. I've been digging around trying to find sample usage of XapianTermIterator/XapianPositionIterator in PHP. The idea is to code up a test case in PHP to perform snippet extraction (with a possible view to coding a pecl extension in C). I found a C++ sample, but that wasn't much help. I must be dense this morning though, since I
2006 Nov 30
1
PHP / XapianQueryParser
...it here for reference, below this message. It might help some people. But now I have one other small problem, and I'm not sure if it is actually my mistake (although I'm pretty sure it is :)) I'm trying to use the XapianQueryParser (in PHP5), but I get an error everytime. $odb = new XapianDatabase($db); $ostem = new XapianStem("en"); $oqparser = new XapianQueryParser();$oqparser->set_stemmer($ostem);$oqparser->set_database($odb);$oqparser->set_stemming_strategy(1);$oqparser->add_boolean_prefix("Q",1);$oquery = $oqparser->parse_query($query, 1); I found so...
2006 May 17
3
QueryParser lowercase / uppercase and stemming
...dn't find a solution. 1. QueryParser does not perform stemming I am working with PHP5 and use the xapian wrapper written by Daniel M?nard I build a query using parseQuery. Output of the parsed query shows that terms are not stemmed, although a stemmer is set ( see code snippet) # create a XapianDatabase object to search in $db = new XapianDatabase($path2db); # every Query needs an XapianEnquire object; i.e. specifying database to search in $enquire = new XapianEnquire($db); # call XapianQuery object $myQueryParser = new XapianQueryParser(); $myQueryParser->setDatabase(...
2009 Mar 02
0
Xapian, PHP bindings and
...rying I can make it work !!! Here is my < simple > code : <?php require_once( '../global.info.php' ); require_once( 'xapian.class.php' ); require_once( 'xapianencode.func.php' ); // Open the database for searching. try { $database = new XapianDatabase( $_PATH.'/_inc/cache/xapian/pa' ); // Start an enquire session. $enquire = new XapianEnquire($database); // Combine the rest of the command line arguments with spaces between // them, so that simple que...
2009 Apr 23
1
PHP Total document
I was also wondering if someone could tell me how to extract the total number of documents contained in a database via PHP. Thanks, Frank
2009 Aug 17
1
Xapian DatabaseError
...equire_once 'search_function.inc'; simpleSearch($query,"xapian_db"); --> xapian_db is the path where is stored xapian db } 2) This is the code of search function.inc <?php require_once 'xapian.php'; function simpleSearch($query,$path){ try { $database = new XapianDatabase($path); $enquire = new XapianEnquire($database); $qp = new XapianQueryParser(); $stemmer = new XapianStem("italian"); $qp->set_stemmer($stemmer); $qp->set_database($database); $qp->set_stemming_strategy(XapianQueryParser::STEM_SOME); $query...
2011 Jun 10
2
Just starting to experiment with php
...DatabaseOpeningError: Couldn't detect type of database From the ex.php file: include "/usr/share/php/xapian.php"; if ($argc < 3) { print "Usage: {$argv[0]} PATH_TO_DATABASE QUERY\n"; exit(1); } // Open the database for searching. try { $database = new XapianDatabase($argv[1]); // Start an enquire session. $enquire = new XapianEnquire($database); ... What did I miss?