The syntax you're using should actually work... are you getting any  
results at all? wrong results? an error?

-- 
Pat

On 01/10/2009, at 2:14 PM, Jochen Kaechelin wrote:

>
>
> Am 01.10.2009 um 09:26 schrieb Pat Allan:
>
>>
>> Hi Jochen
>>
>> You need to have 'created_at' as an attribute, not a field. So add:
>>  has created_at
>> And remove
>>  indexes created_at
>>
>> I would expect sphinx scopes to be evaluated when needed, not when  
>> the
>> model is loaded, but let me know if I'm wrong.
>>
>
> Yep, master Yoda! It works ;-)
>
>
> One last question concerning sphinx_scopes:
>
> Lets say I have:
>
>   sphinx_scope(:new_products) {
>       {:with => {:created_at => 1.week.ago..Time.now } }
>   }
>
>
> How can I use it with something like this?
>
>
> @products = Product.new_products.search
>  :conditions => { :active => 1 },
>  :match_mode => :extended2,
>  :page => params[:page], :per_page => 21,
>  :field_weights => { :boost => 90, :product => 90, :description =>
> 100, :brand => 20 }
>
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to