Am 15.10.2010 um 00:47 schrieb Pat Allan:
> Hi Jochen
>
> Is the delayed job queue being processed when you're making these changes?
> And what does the rest of your define_index block look like?
Cheers,
No, the delayed_job queue is not being processed ;-)
define_index do
indexes product, :sortable => true, :unique => true
indexes order_number, :sortable => true, :unique => true
indexes brand_order_number, :sortable => true, :unique => true
indexes description
indexes brand, :sortable => true, :facet => true
indexes boost, :sortable => true
indexes category_boost, :sortable => true, :facet => true
indexes sales_weight, :sortable => true
indexes product_translations(:trans_description), :as => :translation
indexes tags.name, :as => :tags, :facet => true
indexes unit
has taggings(:tag_id), :as => :taggings_ids
has categories(:id), :as => :category_ids
has colors(:id), :as => :color_ids, :facet => true
has inventory
has at_stock
has price1
has rank
has created_at
has sales_rank
has selling_off
has offline
has sold_out
has has_special_price
has active
has only_order
has recommended
set_property :delta => :delayed
end
I think I had to add something like:
after_save :set_article_delta_flag
# ...
private
def set_article_delta_flag
article.delta = true
article.save
end
But where to put this code?
>
> --
> Pat
>
> On 14/10/2010, at 6:18 PM, Jochen Kaechelin wrote:
>
>> I have 3 models:
>>
>> class Category < ActiveRecord::Base
>> acts_as_nested_set
>> has_and_belongs_to_many :products
>> end
>>
>> class Product < ActiveRecord::Base
>> acts_as_taggable
>> has_and_belongs_to_many :categories
>> ...
>> define_index do
>> ...
>> has categories(:id), :as => :category_ids
>> set_property :delta => :delayed
>> end
>>
>> class CategoriesProduct < ActiveRecord::Base
>> end
>>
>> ----------------------------------------------
>> The categories_products table looks like:
>>
>> id
>> product_id
>> category_id
>> delta
>> ----------------------------------------------
>>
>>
>> When I move a category in the hirarchy using acts_as_nested_set
>> (move_to_child_of ...) everything
>> works fine, but when I move a product to another category TS does not find
>> the product
>> in the new category. After doing a rake ts:in everything works fine.
>>
>> What I'am doing wrog here?
>>
>> Thanx
>>
>> --
>> 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.
>>
>
> --
> 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.
>
--
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.