Thanks for your help, but unfortunately this causes a different error when
running 'rake ts:regenerate':
ThinkingSphinx::SphinxError: unknown column: 'bbc_compliance_names' -
REPLACE INTO bbc_facility_core (id, `sphinx_internal_class_name`, `name`,
`bbc_compliance_names`, `sphinx_internal_id`, `sphinx_internal_class`,
`sphinx_deleted`, `name_sort`) VALUES ('all values for fields are actually
listed here')
On Friday, July 22, 2016 at 11:52:44 PM UTC-4, Scott Macri wrote:
>
> Hello,
>
> I'm new to sphinx and am attempting a has_many_through. I'm using Rails
> 4.2 and Ruby 2.2. I'm getting the following error when running config.
> ThinkingSphinx::SphinxError: unknown column: 'bbc_compliances' - REPLACE
> INTO bbc_facility_core
>
> Here is my setup:
>
> ThinkingSphinx::Index.define :bbc_facility, :with => :real_time do
> indexes name, sortable: true
> indexes bbc_compliances.name, :as => :bbc_compliances
> end
>
> class BbcCompliance < ActiveRecord::Base
> has_many :bbc_facility_compliances, dependent: :destroy
> has_many :bbc_facilities, through: :bbc_facility_compliances
> end
>
> class BbcFacility < ActiveRecord::Base
> after_save ThinkingSphinx::RealTime.callback_for(:bbc_facility)
> has_many :bbc_facility_compliances, dependent: :destroy
> has_many :bbc_compliances, through: :bbc_facility_compliances
> end
>
> Any help would be greatly appreciated. Also, where can I find some
> documentation on complex topics such as this one? Thanks.
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.