I ended up digging around meta search and found the following code:

      def metasearch(opts = {})
        opts ||= {} # to catch nil params
        search_options = opts.delete(:search_options) || {}
        builder = MetaSearch::Builder.new(self, search_options)
        builder.build(opts)
      end

      alias_method :search, :metasearch unless respond_to?(:search)

Long story short this assigns the search method only if one isn't
already defined. TS should do this as well. When I'm done with my
thesis I may fork it and see what I can do.

Brian

On Sep 1, 11:01 am, Pat Allan <[email protected]> wrote:
> The second option you've listed is as good as it gets, I'm afraid - TS  
> isn't built with the expectation of another search library existing.
>
> I guess you could add your own library that your app loads between the  
> two others, and monkeypatches method names, but that really is a  
> hackish solution. I'd recommend using ThinkingSphinx.search, or just  
> using one search library.
>
> Cheers
>
> --
> Pat
>
> On 01/09/2010, at 10:12 AM, PsiPro <[email protected]> wrote:
>
> > Alright I figured out I could use the following as well:
>
> > Model::ThinkingSphinx.search ....
>
> > or
>
> > ThinkingSphinx.search ..., :classes => ['Model']
>
> > Is there a cleaner way?
>
> > Brian
>
> > On Aug 31, 8:49 pm, PsiPro <[email protected]> wrote:
> >> Hello all,
>
> >> I am upgrading to rail3 which means searchlogic won't work anymore.
> >> Most people have recommended switching to meta_search.
>
> >> Unfortunately meta_search also wants to use Model.search
>
> >> To be fair I am asking in their group as well, but is there another
> >> option in TS to use a different function name?
>
> >> Thanks,
> >> Brian
>
> > --
> > 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 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en
> > .

-- 
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