First of all, sorry if this appears in the list twice - i was awaiting
moderation all day and then finally joined the list properly and sent this
direct.

Previously, for all my ferret searches, i was using find_by_contents, like
this:

@stuff = LearningObject.find_by_contents("trumpet",
         #ferret options
         {:multi => [TeachingObject, LearningObject, Lesson, Course],
          :page => 1,
          :per_page => 15 },
         #find options
         {} )

That all worked fine.  We've upgraded to the latest ferret/a_a_f, though,
which no longer uses find_by_contents: i believe we're supposed to use
find_with_ferret instead.  However, if i do the equivalent, with
find_by_contents replaced with find_with_ferret, then the 'multi' part
doesn't work:  i get the same results as if i didn't pass multi at all.

Looking in the API ( http://projects.jkraemer.net/rdoc/acts_as_ferret/ ), it
looks like find_with_ferret doesn't take a :multi option, so i'm in the dark
over how to do multi-model searches now.

My ferret-indexed classes all have ":store_class_name => true", which i read
was necessary for multi searches.  Can anyone help please?

(To make life a bit more complicated, two of the classes extend one of the
others, and i'd like a ferret search on the superclass to return results
from both subclasses.  However, i'd settle right now for just having a
multi-model search that works)

thanks
Max Williams
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to