Hi Phil
You've got a string value in an attribute filter, for what is actually
a field. You will probably want :preview_language => 'es'
in :conditions instead.
Cheers
--
Pat
On 09/09/2009, at 4:15 PM, phil wrote:
>
> When I include an 'order' parameter things go wrong!
>
> If I do this:
>
> @recent_films = Film.search(:without => {:preview_count => 0},
> :page => page, :per_page => 5, :with
> => filters,
> :order => "release_date desc")
>
> with 'filters' defined as:
> filters = {:available => 1, :preview_language => "es" }
>
> I get a list of films that have preview_language = "en". Remove the
> order and I get preview_language of "es" (as requested).
>
> Here is the index block:
>
> define_index do
> has previews(:id), :as => :preview_id
> indexes previews(:language), :as => :preview_language
> has 'COUNT(previews.id)', :as => :preview_count, :type
> => :integer
>
> has created_at, updated_at, available, release_date
> end
>
> What am I doing wrong?
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---