lifejuggler
lifejuggler

Reputation: 460

Thinking sphinx indexing error with rails 3.2

I am having trouble installing thinking sphinx in my ubuntu 12.04.

Whenever I run rake ts:index, I get the following.

Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'
Generating configuration to /home/tom/digmenu/config/development.sphinx.conf
Sphinx 2.0.6-id64-release (r3473)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/home/tom/digmenu/config/development.sphinx.conf'...
FATAL: no indexes found in config file '/home/tom/digmenu/config/development.sphinx.conf'

model.rb

define_index do indexes :name, as : :re_name end

config file for sphinx

indexer
{
}

searchd
{
  listen = 127.0.0.1:9306:mysql41
  log = /home/tom/digmenu/log/development.searchd.log
  query_log = /home/tom/digmenu/log/development.searchd.query.log
  pid_file = /home/tom/digmenu/log/development.sphinx.pid
  workers = threads
  binlog_path = /home/tom/digmenu/tmp/binlog/development
}

I have absolutely no idea why this doesn't work! the config was generated during indexing but quits.

Anyone have any idea?

Upvotes: 1

Views: 851

Answers (1)

Weetu
Weetu

Reputation: 1773

You might have already solved your problem, but here goes anyway. Maybe it'll help someone else.

The reason for this problem is that you're probably using Thinking Sphinx 3.0 or newer, but defining your indexes the old way, like it was done in Thinking Sphinx 2.* and earlier. The index definitions are no longer in the models themselves but in separate files, which are placed in app/indices. There have also been lots of other changes, so it's best to read the new documentation carefully.

The documentation for 3.0 is in the README file: https://github.com/pat/thinking-sphinx/

The "official" documentation still refers to the older version, which works differently: http://pat.github.com/ts/en/

Upvotes: 4

Related Questions