:(

Unfortunately, it doesn't seem to be working that way.  Lets say I
have a model called History and one called Contact.  My only index
block in the entire project is in History.  In the controller, I'm now
calling History.ts_search, and that search works fine.  Unfortunately,
when I want to go to the contact page and do a search with a
Contact.search, and there is a self.search method in the Contact
model, I get the "Missing Attribute for Foreign Key" error generated
by TS (see below).  I have no index block defined in Contact.  It's
like TS is doing the global search when it should be doing a model
search.  Before I added the ts_search, I was doing a History.search,
not a ThinkingSphinx.search, so it should have been looking at just
History.  I can't understand why it's looking at Contact.  Any ideas?


RuntimeError (Missing Attribute for Foreign Key intranet_id):
  /Users/user/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/lib/
thinking_sphinx/active_record/has_many_association.rb:28:in
`attribute_for_foreign_key'
  /Users/user/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/lib/
thinking_sphinx/active_record/has_many_association.rb:32:in
`default_filter'
  /Users/user/.rvm/gems/ruby-1.8.7-p302/gems/thinking-sphinx-1.4.4/lib/
thinking_sphinx/active_record/has_many_association.rb:7:in `search'
  app/controllers/contacts_controller.rb:53:in `index'

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

Reply via email to