On Dec 27, 2007, at 5:34 PM, Benjamin Krause wrote:
acts_as_ferret is storing one index per model. That is why you need
the multi_search method. However, Ferret does not need to store
separate indexes per model. acts_as_ferret is using a so-called
MultiSearcher, see

http://ferret.davebalmain.com/api/classes/Ferret/Search/MultiSearcher.html

to access several indexes at once to search them all. So yes, you
can use Ferrets own MultiSearcher to access all indexes you need
at once. However, acts_as_ferret may change the way the index is
stored in the future, so if you mix acts_as_ferret and 'standard' ferret
API calls, you might have a problem with future versions of AAF.



Thanks Benjamin for your response.


So if you don't have a specific reason to use your own MultiSearcher,
you shouldn't do it :-) What do you want to achieve?

If I am using ferret/AAF to index Car, Boat, and Train, and I want to perform a search on all those objects and get mixed results from all of them simultaneously, the only way I know of to achieve this is to pick one of the models -- say, Car -- and invoke Car.multi_search, with appropriate flags to specify searching all models. This works fine but is a bit sloppy since the method could have been called on any of the models. I was wondering if there is an official or unofficial way to avoid this.

Cheers,
John
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to