I think conditions[:beat] = beat == "true" should be conditions[:beat] = beat = "true". I had some issues with this setup before (with MySQL) and solved by using something like conditions[:beat] = "1".
Consultor en Creatividad Digital y Tecnologías Web Software Research & Development Peru ----------------------------------------------------------- [EMAIL PROTECTED] [EMAIL PROTECTED] (511)93756390 http://www.srdperu.com ----------------------------------------------------------- On Mon, Dec 8, 2008 at 12:58 PM, j0llyr0g3r < [EMAIL PROTECTED]> wrote: > > Hey guys, > > i have a working text-search based on sphinx / thinking sphinx which > looks like that in the model: > > Track.search keywords, :page => page, :per_page => > TRACKS_PER_PAGE, :order => sort > > Now, i want to confine the number of results i get based on a boolean > field in my model. > > The relevant part of the migration is: > > t.boolean :beat, :default => false > > So i adjusted the call to the search-method like this: > > conditions[:beat] = beat == "true" > Track.search keywords, :page => page, :per_page => > TRACKS_PER_PAGE, :order => sort, :conditions => conditions > > As far as the documentation goes, this should work, right? > > Unfortunately, it doesn't. > > I always get back 0 result. > > In my debug-log i can see that "conditions[:beat] = beat" is set to > true correctly. > > So what is the problem with that query? > > I would like to post relevant log-entries -> unfortunately there > aren't any written when i do the above described call. > > Thanks for every help! > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
