class Store < ActiveRecord::Base
  has_many :product_stores
  has_many :products, :through => :product_stores

  define_index do
    indexes :name
    indexes [products(:name), products(:brand)], :as => :product_names

    has products(:kosher_id), :as => :product_kosher_ids
  end
end

Oddly:

Store.search :conditions => { :product_names => 'chicken' }

^ This returns stores properly, but:

Store.search :conditions => { :product_names => 'chicken' }, :without
=> { :product_kosher_ids => 0 }

^ Returns an empty array. I've no idea why.

I know the data is present in the database.

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