On 01/10/2009, at 12:00 AM, Jochen Kaechelin wrote:

>
> I'am not successfull in get this working:
>
> sphinx_scope(:latest_first) {
>      { :order => 'created_at DESC' }
> }
>
> I always retrieve 0 hits.

What does your define_index block look like?

> BTW is this possible with freelancing-god-thinking-sphinx?
>
> named_scope :old_product, lambda { {:conditions => ["created_at < ?",
> 1.month.ago]} }

Sphinx doesn't have the concept of greater/less-than, but you can get  
around it with a range:
   sphinx_scope :old_product {
     {:with => {:created_at => (0..1.month.ago)}}
   }

This is essentially filtering from the unix epoch (1st Jan 1970) up  
until 1 month ago.

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