It sounds like category is an association for Product. Why not filter  
by the id instead, to ensure it's always correct?
   define_index do
     # ...
     has category(:id), :as => :category_id
   end

   Product.search :with => {:category_id => @category.id}

-- 
Pat

On 02/06/2009, at 11:59 AM, tilt wrote:

>
> Hi,
>
> Is there a way to select an older version of a record even if I've
> activated the delta property?
>
> We've got the following problem:
>
> We'd like to select products filtered by a certain category using the
> permalink of the category.
> If the category name is updated and thus its permalink, the filtering
> Product.search :conditions => {:category => permalink} fails because
> the condition tries to match the former permalink of the category.
> Unfortunately Sphinx only uses the delta index of the model the query
> is perfomed on, e.g. "Product".
>
> So if we can't tell Sphinx to use the delta index for categories
> although they only appear within the conditions we apply to search
> products, we'll have to tell Sphinx to look up the former category's
> name - ignoring the delta index.
>
> Any ideas?
>
> Thanks a lot!!!
> >


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