Thinking Sphinx No Sources Found in Config?

Hi,

I am trying to get Thinking Sphinx running. See snippet below. I
receive an error message stating that “no sources found in config file”.
I cannot find any information on the thinking sphinx site on what this
problem means.

I believe in sphinx terminology ‘sources’ means ‘indexes’. I did add a
define_index block to one model before I ran the rake index task.

Any ideas on what I am doing wrong?

Thanks,

John


[email protected]:/var/www/rails# rake ts:in
(in /var/www/rails)
indexer --config /var/www/rails/config/development.sphinx.conf --all
Sphinx 0.9.8-release (r1371)
Copyright © 2001-2008, Andrew Aksyonoff

using config file ‘/var/www/rails/config/development.sphinx.conf’…
FATAL: no sources found in config file.
[email protected]:/var/www/ipvideomarket#

On 16 Aug 2008, at 23:49, John H. wrote:

add a
define_index block to one model before I ran the rake index task.

I don’t know thinking sphinx, but sphinx itself has both sources and
indexes (an index is composed of one of more sources).

Fred

btw, this is my current conf file:

indexer
{
mem_limit = 64M
}

searchd
{
port = 3312
log = /var/www/rails/log/searchd.log
query_log = /var/www/rails/log/searchd.query.log
read_timeout = 5
max_children = 30
pid_file = /var/www/rails/log/searchd.development.pid
max_matches = 1000
}

i notice it does not have any sources or indexes, what i guess i don’t
understand is how to generate them; i thought by adding the define_index
block and then running ts:in, that it would generate, no?

Hi Ryan, I just tried that. The conf file and the error messages are
the same. I deleted the conf file and ran the rake configure task but
same issues.

Ryan B. wrote:

Did you run rake thinking_sphinx:configure?

Did you run rake thinking_sphinx:configure?

I solved my problem.

The issue was I copied the code from the Thinking Sphinx usage page
(http://ts.freelancing-gods.com/usage.html) and then modified to my
needs.

I deleted it and re-wrote it the same text by hand. I re-ran ts:in an
this time it worked perfectly.

Thanks for the help everyone.

Best,

John

ThinkingSphinx uses a YAML configuration file. I’m not sure where
you’re putting this conf file, but TS won’t use it. ThinkingSphinx
doesn’t require the YAML config file IIRC, you only need it if you
want to change TS’s defaults.

ThinkingSphinx will also only index things you tell it to index. You
tell it to index things with a define_index block in the model. If TS
isn’t indexing anything and you try to run the indexer, it will
probably complain.

Add your define_index blocks, run rake ts:config, run rake ts:in and
run rake ts:daemon:start

On Aug 16, 7:54 pm, John H. [email protected]

Rein H. wrote:

Add your define_index blocks, run rake ts:config, run rake ts:in and
run rake ts:daemon:start

Hi Rein,

I have done all of those steps. Perhaps I am making an error with my
define_index blocks? Do I need to use define_index blocks in all of my
models?

Right now, I only applied this to 1 model with a very basic setup, e.g.:

class Article < ActiveRecord::Base

define_index do
# field
indexes content
end

end

Any thoughts?

John

Yeah, no config.yml is required, and no explicit configure is required
either (because the index task depends on configure).

There’s a mailing list for Thinking Sphinx:

http://groups.google.com/group/thinking-sphinx

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs