Unfortuantely, there's no easy way to customise the search method name...

Although, if you have your define_index block before your custom search method 
in the model, then it will overwrite TS's search method. And then, you could 
create your own ts_search method:

  def ts_search(*args)
    ThinkingSphinx::Search.new *search_options(args)
  end

I've not tried this myself, but in theory it should work. Not sure if there's 
issues deeper within Thinking Sphinx where it expects Model.search to be there 
as per normal, though.

Cheers

-- 
Pat

On 24/06/2011, at 11:41 AM, UnConundrum wrote:

> I'm adding TS to a rather mature application with 173 models.
> Unfortunately, we have many "search" methods defined and it would take
> days to go through the code and change everything.  Is there any way
> to customize the search command in TS to use something like ts_search
> instead of just search?
> 
> My third issue today....  I'd be remiss not to thank you for all the
> time and effort you're putting into the project.  I for one, greatly
> appreciate it.
> 
> -- 
> 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.
> 

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