Thinking Sphinx has Sphinx scopes, and the search results aren't executed until required (just like ActiveRecord in Rails 3), so it won't evaluate until you try to access search results (via .each, .empty?, etc).
http://freelancing-god.github.com/ts/en/scopes.html Cheers -- Pat On 15/08/2011, at 7:29 PM, Linus Oleander wrote: > Is it possible to create a scope like this (Sunspot example)? > > scoped = Sunspot.new_search(Model) > > scoped.build do > # ... > end > > scoped.build do > # ... > end > > scoped.execute.results > > I need to pass around the 'scoped' variable and in the end be able to > execute it. > Is that possible using thinking sphinx? > > -- > 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.
