Hello,

I am using thinking sphinx in one of my projects.
Indexing of eager loaded associations is not working for me. I dont
know if any one faced this issue earlier.

Following is my model for surveys...where I was eager loading the
questions using :include for retrieval of favorite answer

class Survey < ActiveRecord::Base
  has_many :questions
  has_many :answers

  has_one :favorite_answer, :as => :profile, :class_name =>
"Answer", :conditions => "questions.about = 'favorite' ", :include
=> :question

  define_index do
    indexes "login" , :as => :name, :sortable => true

    has favorite_answer.value, :as => :favorite, :type => :integer
    has :updated_at, :sortable => true
  end
end

When I run rake ts:index its breaking and giving error some thing like
unknow column 'about'

When I checked configuration file, I don't see any join for eager
loaded question model(:include => :question) in
sphinx.development.conf

Can any suggest solution for the above issue...

Thanks
Raghu

-- 
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