Documentation is always in need of more examples :)
Because you can't filter using OR logic, you need to combine the two
collections together:
has [participants(:id), directors(:id)], :as => :crew_ids
And then search as follows:
Film.search :with => {:crew_ids => 12345}
Cheers
--
Pat
On 28/05/2009, at 11:13 AM, phil wrote:
>
> I have a like this:
> class Film
> indexes participants(:name), :as => :actor_name
> has participants(:id), :as => :actor_ids
>
> indexes directors(:name), :as => :director_name
> has directors(:id), :as => :director_ids
> end
>
> given a person's id of 12345 how can I find films where 12345 was
> either director or actor? I can't figure out the syntax.
>
> There is an utter void of examples!
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---