I have a model called Product with the following index:
define_index do
indexes :desc
indexes :name
indexes :meta_keywords
indexes :meta_desc
has :product_status_id, :variant_type_id, :manufacturer_id, :base_price, :created_at, :rating_score, :sold_serial_numbers_count, :views_count
has categories(:id), :as => :category_ids
has operating_systems(:id), :as => :operating_system_ids
has host_applications(:id), :as => :host_application_ids
has product_types(:id), :as => :product_type_ids
set_property :delta => :delayed
end
If i comment out the associations below delayed job indexes the new
fields as expected but when i include them delayed job does nothing.
has categories(:id), :as => :category_ids
has operating_systems(:id), :as => :operating_system_ids
has host_applications(:id), :as => :host_application_ids
has product_types(:id), :as => :product_type_ids
I cant find anything specific in the group regarding this, one or two
people mentioning it but no fix. Can anyone explain why its happening
and if there is a fix for it.
I have the following setup:
Thinking Sphinx Gem 1.3.16
TS delayed delta 1.0.4
rails 2.3.2
postgres 8.4
JB
This sounds like some issues that were being hit with deltas a while ago, but I was quite sure they're fixed. When you're creating a new Product without any of the association objects (so - categories.collect(&:id) is [], etc), does it work? What happens if you create a new Product that has at least one of each of the associations?
Cheers
--
Pat
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
Thanks for responding, im picking this up again. It doesn't work if i
create a product with or without any or all the associations.
Im a bit stuck on this,
JB
Some more investigation on this...........i commented out each of the
relationships until i and it looks like this line is the culprit,
has product_types(:id), :as => :product_type_ids
the relationship is a has_many :through like the others but for this
particular form i only allow the user to select one product type not
multiple. Not sure why this would make a difference anyway so i need
to look into that.
So just to clarify, it is working fine with or without my
relationships, its just that one instance above,
Thanks for your help,
JB
Would it be possible for you to send me a copy of your Rails project (or if it's on GitHub, grant me access temporarily) so I can investigate this with the models you've got set up? Sounds like an edge case, and not sure how to reproduce it...
If you're interested in this, let's continue the discussion off-list.
--
Pat