I've used search_for_ids successfully in the past like so:

ids = Model.search_for_ids(... whatever ...)
@collection = Model.active.published.whatever.find(ids)

The alternative, as was mentioned, is to use sphinx_scope and/or
handle some of that stuff in the index itself. You can, for instance,
choose to only index posts that have published = true if that makes
sense in your business rules (e.g. if the search isn't used in the
backend where you also list/search for unpublished posts).

- C.

On Feb 23, 11:11 pm, Aaron Gibralter <[email protected]>
wrote:
> Is this still the case? It seems like named_scope is ignored as of 1.4.3...
> but how about the v2 branch? Does TS support dynamic arel queries?
>
> I could see why conditions, orders, and limits would be ignored... but it's
> tough not being able to include includes to avoid N+1 queries... what's the
> best way to do it? search_for_ids then pass those to a named_scope find?
> with_scope seems to work too...

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