The issue is that Thinking Sphinx's documentation is mostly for v2, but v3 is what you're using (and much better). Index definitions are now located in app/indices - the README is your best source of information (but anything it doesn't cover is probably the same as earlier versions):
https://github.com/pat/thinking-sphinx/blob/master/README.textile
Have a read through of that, move your index definition, and you should be good to go. Any further issues, get in touch :)
--
Pat
On 06/03/2013, at 6:12 PM, Sasha Klein wrote:
> Hi,
>
> Just installed Thinking Sphinx for my Rails app and have run into the above error. Opened a Stack Overflow post about it, but it doesn't seem to be getting many views/answers. I'll leave the bulk of my code there, where I think it's easier to comb through, but just reiterate the basic problem here.
>
> I installed TS and MySQL (already runny development and production on postgresql), then defined indexes for my post model, and went to run "rake ts:index" per the instructions on this Railscast, but I got the error in the subject line.
>
> I searched for solutions and ran into this other similar post, but it seems like we have different root causes, as the result of running "Post.sphinx_indexes.length" in the console shows. At any rate, all of this code and some more background is visible in the SO post.
>
> Any ideas what's going on? If you'd rather I post the code here, I can do that as well. Just felt redundant.
>
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
> To post to this group, send email to thinkin...@googlegroups.com.
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
indexing index 'post_core'...ERROR: source 'post_core_0': unknown type 'pgsql'; skipping.ERROR: index 'post_core': failed to configure some of the sources, will not index.total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avgtotal 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
development:bin_path: '/usr/local/bin'develpment:bin_path: '/usr/local/bin'
indexer{}searchd{listen = 127.0.0.1:9306:mysql41log = /Users/<personal>/rails_projects/<personal>/log/development.searchd.logquery_log = /Users/<personal>/rails_projects/<personal>/log/development.searchd.query.logpid_file = /Users/<personal>/rails_projects/<personal>/log/development.sphinx.pidworkers = threadsbinlog_path = /Users/<personal>/rails_projects/<personal>/tmp/binlog/development}source post_core_0{type = pgsqlsql_host = localhostsql_user = <personal>sql_pass =sql_db = <personal>_developmentsql_query = SELECT "posts"."id" * 1 + 0 AS "id", 'Post' AS "sphinx_internal_class_name", "posts"."name" AS "name", "posts"."content" AS "content", "posts"."id" AS "sphinx_internal_id", 'Post' AS "sphinx_internal_class", 0 AS "sphinx_deleted" FROM "posts" WHERE ("posts"."id" >= $start AND "posts"."id" <= $end) GROUP BY "posts"."id", "posts"."name", "posts"."content", "posts"."id"sql_query_range = SELECT COALESCE(MIN("posts"."id"), 1), COALESCE(MAX("posts"."id"), 1) FROM "posts"sql_attr_uint = sphinx_internal_idsql_attr_uint = sphinx_deletedsql_attr_string = sphinx_internal_classsql_query_info = SELECT "posts".* FROM "posts" WHERE ("posts"."id" = ($id - 0) / 1)}index post_core{path = /Users/<personal>/rails_projects/<personal>/db/sphinx/development/post_coredocinfo = externcharset_type = utf-8source = post_core_0}
No worries about asking questions - especially since I think I can answer this one :)
It looks like Sphinx on your machine was compiled without support for PostgreSQL. How did you install PostgreSQL? And how did you install Sphinx? If you compiled by hand, Sphinx doesn't automatically add PostgreSQL support - you need to set it with a flag (it's annoying, because I use PostgreSQL all the time too). It's mentioned in the UNIX section of the TS docs briefly:
http://pat.github.com/ts/en/installing_sphinx.html
From your file paths, I'm guessing you're on OS X - if you installed Sphinx via homebrew, but PostgreSQL from elsewhere (say, Heroku's Postgres.app), then you may need to provide some flags then as well to make sure homebrew detects PostgreSQL successfully.
Cheers
Pat
You received this message because you are subscribed to a topic in the Google Groups "Thinking Sphinx" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thinking-sphinx/BTgd3_cGF-0/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to thinking-sphi...@googlegroups.com.
Yes, it's not free - each customer needs a decent amount of memory for their Sphinx daemon, so offering free plans is just not viable I'm afraid.
--
Pat