As some of you might have noticed, I've been a bit busy lately creating new PECL extension -
sphinx.
The extension provides an interface to a feature-rich fulltext search engine
Sphinx written by Andrew Aksyonoff.
We (Andrew and me) made our best to keep the extension as compatible to the pure-PHP API (shipped with Sphinx) as possible in order to make the transition easier, so if you're already using PHP API, you only need to remove (or comment out) the
include "sphinxapi.php"; line and enable the extension in your php.ini.
Yes, it's
that easy.
I also added a documentation for it to the PHP manual -
http://php.net/sphinx, it covers all the functions, but lacks code examples at the moment (contact me if you want to contribute some, it's very much appreciated).
To install the extension you need libsphinxclient (it's shipped with Sphinx since v0.9.8), here is a short installation guide:
# tar -xzvf sphinx-0.9.8.tar.gz
# cd sphinx-0.9.8/api/libsphinxclient/
# ./buildconf.sh
# ./configure && make install
After that PECL will do all the work for you:
# pecl install sphinx-beta
I've got no complaints so far, so I suppose I can call it stable in a month or so.
Until then I'll continue to gather feedback (please use
PECL bug-tracker if you encounter any problems, thanks!).
-Alagu
Keep it going!
But seriously, I believe this is the right way to do it [tm], a PHP API sending/receiving some obscure binary data is much more difficult to debug and maintain.
I also hope that the extension would attract some more attention to Sphinx, which is also good.
This will be a great extension for all those who need it!
I have problems installing libsphinxclient.
This is the output that I got :
$ sudo ./buildconf.sh
rebuilding Makefile.in files
configure.in: 14: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
Makefile.am:9: LTLIBOBJS seen but never set in `configure.in'
make: *** [makefiles] Error 1
Any ideas how to fix this?
/usr/share/aclocal/libmcrypt.m4:17: warning: underquoted definition of AM_PATH_LIBMCRYPT
Is this just a warning or is it a critical error?
Thanks
-Olaf
Just another autotools weirdness..
Query failed: per-query max_matches=0 out of bounds (per-server max_matches=1000)
Bringing back sphixapi.api and disabling the extension makes it work properly again:
tester found 33 times in 23 documents
Any pointers?
How about a short reproduce case with some explanations? (please remember I'm no way a Sphinx expert)
function SetLimits ( $offset, $limit, $max=0, $cutoff=0 )
However, this does not mean that a zero is acceptable value for max_matches. sphinxapi.php goes on to say:
if ( $max>0 ) $this->_maxmatches = $max;
Perhaps the PECL extension sets zero when $max is not specified?
But to copy the PHP API behaviour, libsphinxclient should ignore max_matches
./libtool: line 462: CDPATH: command not found
./libtool: line 1265: func_opt_split: command not found
libtool: Version mismatch error. This is libtool 2.2, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2
libtool: and run autoconf again.
Any idea on how fix this issue?
Updated Autoconf to 2.63
Still getting that error. Also getting before that:
configure.in:21: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain cv to be cached
configure.in:21: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain cv to be cached
....
About 20 more lines of that..