[Xapian-discuss] Having trouble compiling xapian-bindings for php
olly at survex.com
Sat Jun 16 13:58:46 BST 2007
On Fri, Jun 15, 2007 at 10:55:24PM -0700, Josh wrote:
> I created a symbolic link so this will work for me.
> ln -s /usr/local/lib/libxapian.so.15 /usr/lib/libxapian.so.15
If libxapian is installed outside of the standard library search path,
the PHP module should get an "RPATH" set so that it automatically finds
libxapian. This isn't happening for you for some reason, which is why
this isn't working.
What does your /etc/ld.so.conf contain?
> I copied the examples provided in Quickstart document and was able to create
> an index and query it. However the php wrapper does not return results.
> Still diggin into this and not sure where to start.
> [josh at home XAPIAN]$ ./quickstartsearch proverbs look
> Performing query `Xapian::Query(look)'
> 1 results found
> Document ID 2 99% [Don't look a gift horse in the mouth]
> [josh at home XAPIAN]$ php simplesearch.php5 proverbs look
> Parsed query is: Xapian::Query(Zlook:(pos=1))
> 0 results found:
The simple examples now use the TermGenerator and QueryParser classes,
but the quickstart document doesn't (yet anyway - it would probably make
sense for it to follow).
The "simplesearch.php5" script expects your database to contain stemmed
forms with a "Z" prefix, but it doesn't. If you use simpleindex.php5
with simplesearch.php5, that should work.
> Also was not able to create an index using simpleindex.php5, the script runs
> without error but just stays open til I ctrl+c.
It's expecting input on stdin - you need to redirect the file to be
php5 simpleindex.php5 < SOMEFILE.TXT
More information about the Xapian-discuss