It's here:

http://pastie.org/493662

The full define index block for film is this:

  define_index do
    indexes :title, :as => :title_en, :sortable => true
    indexes titles_es.title, :as => :title_es, :sortable => true
    indexes synopses.synopsis, :as => :synopsis

    indexes participants(:name), :as => :actor_name
    has participants(:id), :as => :actor_ids

    indexes directors(:name), :as => :director_name
    has directors(:id), :as => :director_ids

    has [participants(:id), directors(:id)], :as => :crew_ids

    indexes subgenres.genre_id, :as => :genre_id

    indexes permalink_en.link, :as => :permalink_en, :sortable => true
    indexes permalink_es.link, :as => :permalink_es, :sortable => true

    indexes "left(films.title, 1)", :as => :letter_en, :sortable =>
true
    indexes "left(translated_titles.title, 1)", :as
=> :letter_es, :sortable => true

    has created_at, updated_at, available

  end


On May 28, 11:54 pm, Pat Allan <[email protected]> wrote:
> Hmm. Can you put your development.sphinx.conf file on gist or pastie?  
> Make sure you take out your database passwords :)
>
> --
> Pat
>
> On 28/05/2009, at 2:52 PM, phil wrote:
>
>
>
> > Hmmm
> > The only thing is this:
> > @films = Film.search  :with => {:available => 1, :crew_ids =>
> > @person.id} yielded 40 results
>
> > @films = Film.search  :with => {:available => 1, :actor_ids =>
> > @person.id} yielded 45
>
> > How can that be?
>
> > On May 28, 11:03 pm, Pat Allan <[email protected]> wrote:
> >> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to