I've been stuck on this for almost a full day now and have a read a bunch 
and can't figure this out.

I'm in the midst up upgrading a rails 3 app to 4 (and eventually 5).  Right 
now, I'm on rails 4.0.6 (before upgrading to 4.2).

My Sphinx version is 2.2.11 and my Thinking Sphinx version is 3.3.0.

I'm using postgres as the backend.

I'm on macOS Sierra and installed Sphinx with brew install sphinx 
--with-mysql --with-postgresql.

Here is my model:

class Company < ActiveRecord::Base
  # ..
  has_many :company_certifications
  has_many :certifications, through: :company_certifications
  # ..
end

ThinkingSphinx::Index.define :company, with: :active_record do
  # ..
  has company_certifications.certification_id, as: :certification_ids
  # I've tried adding `multi: true` here as well as `type: :integer` and 
combinations of both
  # ..
end

rake ts:rebuild works just fine but certification_ids is an array of 
strings as opposed to integers!  This is, of course, causing issue with 
SELECT statements in postgres.

Any help is greatly appreciated, of course.

Thank you!

-- 
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-sphinx+unsubscr...@googlegroups.com.
To post to this group, send email to thinking-sphinx@googlegroups.com.
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to