Hi Roger Yes, that's correct - scopes are tied to single models, and a global search isn't in the scope of any model. Thus, Thinking Sphinx doesn't try to use any scopes.
I'm afraid there's no way around this beyond adding the filter into the search manually yourself - though if you have thoughts on how TS could be improved in these scenarios, I'm certainly interested to hear them :) -- Pat On 17/07/2012, at 7:01 PM, Roger Kind Kristiansen wrote: > I've just added functionality for setting entries in some of my models as > inactive, and I never want to have those returned in a search. > > Therefore I added a sphinx_scope and set this as my default_sphinx_scope. > This all works perfectly when searching single models, but when performing a > search across multiple models it seems this scope is ignored. I glanced > quickly at the code, and, it seems this is by design > (lib/thinking_sphinx/search.rb:add_default_scope()). > > Is that correct, and is there any other way for me to apply the scope to a > selection of the models I'm searching? > > Cheers, > Roger K. Kristiansen > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/thinking-sphinx/-/TUTtbuTPKcoJ. > 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.
