Hi all!

First of all I'm new with thinking sphinx and my english is so bad :(

Well, I'm trying to define a default_sphinx_scope for some of my
models and I want to use it with a global search (search of my all
models included ones without a default_sphinx_scope defined). I'm
surfing into the library code and I've found this:

module Thinking Sphinx
  class Search
    ...

    def search(*args)
      add_default_scope
      merge_search ThinkingSphinx::Search.new(*args)
      self
    end

    ...
  end
end

So I think is possible what I want but when I try to use it in the
following manner:

ThinkingSphinx.search("query term")

I don't get good results

In the model with the default_sphinx_scope define I do:

Model.my_default_scope.search("query term")

And I get good results

So Can I use the default_sphinx_scope in a search over all my indexed
models?

Thanks in advance

--

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