[LRUG] Sphinx and Sphincter

Andrew Stewart boss at airbladesoftware.com
Wed Jan 30 10:05:26 PST 2008


On 30 Jan 2008, at 17:53, Nick Ludlam wrote:
>> On 30 Jan 2008, at 17:43, Nick Ludlam wrote:
>>> So can you run the index by hand, as you mentioned?
>>>
>>>   /opt/sphinx/bin/indexer --config <your sphinx file> users
>>
>> But it's not in /usr/local and I don't have an /opt directory like
>> you.  Do you know how I can find it?
>
> In that case, you'll find the indexer and searchd in /usr/local/bin/

Aha!  I found them just as your email arrived in my inbox.  I had  
been looking for /usr/local/sphinx/bin/indexer rather than plain /usr/ 
local/bin/indexer.

Moving swiftly on, I commented out those lines you suggested and the  
output is cleaner.  Thanks.

Here's the result:

$ /usr/local/bin/indexer --config sphinx.conf users
Sphinx 0.9.8-dev (r1112)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file 'sphinx.conf'...
indexing index 'users'...
ERROR: key 'sql_host' not found in source 'users'
ERROR: index 'users': no valid sources configured; skipping.

Now I see the problem.  I presume Sphincter's auto-generated Sphinx  
configuration omitted sql_host because my database.yml doesn't have a  
host key.

When I add it in, set to localhost, I get this:

$ /usr/local/bin/indexer --config sphinx.conf users
Sphinx 0.9.8-dev (r1112)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file 'sphinx.conf'...
indexing index 'users'...
collected 1737 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 1737 docs, 30385 bytes
total 0.433 sec, 70121.23 bytes/sec, 4008.58 docs/sec

Yay!  Thank you :)

I hope any subsequent problems will be isolated in the plugin.

Thanks for the help -- I'll buy you a beer as/when I bump into you at  
LRUG.

Regards,
Andy

-------
http://airbladesoftware.com






More information about the Chat mailing list