> Well, I'm not sure about nicer, but you could use ThinkingSphinx.count/
> Model.search_count with filters on the created_at attribute to get  
> each of those values. It's not facets, but it'll do the same job.

neat idea - I didn't think about that at all. I'll try it!

> > As well, did anyone implement some dive-in date facets ? (first years,
> > 2009, 2008, 2007, then if the user selects 2009 displays months inside
> > instead, etc..) ?
>
> Hmm, this is trickier... you could create a facet on the year, and a  
> facet on the month, and only request the year facet for the upper  
> level, then only request the month facet (while filtering on year) for  
> the lower level.
>
> has 'YEAR(created_at)',  :as => :year,  :type => :integer, :facet =>  
> true
> has 'MONTH(created_at)', :as => :month, :type => :integer, :facet =>  
> true
>
> Model.facets :facets => [:year]
> Model.facets :facets => [:month], :with => {:year => 2008}

Nifty - it will work as well.

thanks a lot - I'll report back if I find any other ideas that work on
the way.

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