How to manually configure TS database

10 views
Skip to first unread message

Lucas Húngaro

unread,
Aug 5, 2010, 3:55:43 PM8/5/10
to Thinking Sphinx
Hi there.

I'm using octopus for master/slave replication and want TS to use the
slave database for searches. When I try doing a search, I got the
following error:

TypeError: can't clone NilClass
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/source.rb:23:in `clone'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/source.rb:23:in `initialize'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/index/builder.rb:258:in `new'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/index/builder.rb:258:in `source'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/index/builder.rb:104:in `indexes'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/index/builder.rb:103:in `each'
from /Users/lucashungaro/.rvm/gems/ree-1.8.7-2010.01/gems/thinking-
sphinx-1.3.18/lib/thinking_sphinx/index/builder.rb:103:in `indexes'

How can I manually configure the database TS will query?

Pat Allan

unread,
Aug 6, 2010, 2:05:34 AM8/6/10
to thinkin...@googlegroups.com
Hi Lucas

I'm just skimming through the Octopus source now, and it seems it puts a proxy in place of the usual connection object. So I guess the short answer right now is that Thinking Sphinx does not work with Octopus, I'm afraid.

To some extent, I'm happy to keep TS playing nicely with other libraries, but it's difficult in this case, given Octopus replaces ActiveRecord internal objects.

There's no manual way to set the database settings for TS - this isn't something that gets asked for much. If you want to fork and patch, I'd definitely consider merging it in.

Sorry I don't have happier news for you.

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>

Jeremy Peterson

unread,
Aug 6, 2010, 6:41:37 AM8/6/10
to thinkin...@googlegroups.com
If you can create a new/copy of the model using activerecord it just
might work. Admitedly it's an ugly hack, but it's somethig worth
trying.

Jeremy

Reply all
Reply to author
Forward
0 new messages