[Sputnik-list] Solved : For Sphinx full text search
pierre pracht
pierre.pracht at gmail.com
Wed Feb 20 19:24:26 GMT+2 2008
I have managed to make it work by unpacking "manually".
I may remove lpack dependency.
Le 20 févr. 08 à 21:40, Yuri Takhteyev a écrit :
> I've been thinking that a Lua binding to Xapian would be the ideal
> solution for search, mostly because I like the fact that it provides a
> library rather than an integrated search solution. But I haven't
> seriously looked into this and I am not committed to this opinion and
> I am wondering what you think the advantages of Sphinx are?
Nope, I wasn't aware of Xapian.
Visibly, Sphinx is nice in the way it can plug directly in mysql.
But it wouldn't help for sputnik
In Sphinx :
Query were sent over a socket
(code converted form python to lua 600 loc need to be tested)
Just need to write a form who will call :
require"sphinxapi"
local cl = sphinx.Sphinx.new()
local res = cl:Query(query)
Indexing can be done over a stdout of a program :
http://sphinxsearch.com/doc.html#xmlpipe
So you just have to write a custom template
>> lpack use a different notation than pack in python and I haven't
>> really
>> understood it.
Will remove lpack.
>> I get some doubt that I can do : sock:receive(8) with luasocket.
Work, code after get made due to previous error
Finally :
I make this adaptation of python code to learn lua.
I may try to make custom view and query form (but not yet)
Code is untested, just launched a test query.
Ideally I would convert test.lua in a command line utility, but getopt
in lua is #@$/\
So Give it a try If you want...
- pierre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: luaSphinxAPI.zip
Type: application/zip
Size: 6201 bytes
Desc: not available
Url : http://lists.luaforge.net/pipermail/sputnik-list/attachments/20080220/3d5541d4/luaSphinxAPI-0001.zip
-------------- next part --------------
More information about the Sputnik-list
mailing list