Unfortunately this isn't currently going to work as you'd like. It'd certainly 
be cool, and I think TS v2 had something vaguely like this, but it gets 
complicated quickly (just with parsing the include values - symbols, arrays 
*or* hashes, ergh).

I wonder if it's possible to extend the search middleware to allow for this (or 
perhaps translate a custom option to cover this). That way, I don't have to 
maintain it, but it's useful for you :) Perhaps worth looking into, if you've 
got the time? Will certainly involve some spelunking through the TS code though.

-- 
Pat

On 2 Jul 2014, at 11:45 am, Roger Kind Kristiansen 
<[email protected]> wrote:

> I'm passing in an :include parameter to ThinkingSphinx.search to eager load 
> some associations when searching. Now I'd like to add eager loading for 
> association which only exists on one of the two models, but that does not 
> work very well when the objects belonging to the other models get loaded.
> 
> I don't find it very likely, but I just have to ask: Is there any clever way 
> of doing this so that the eager loading would only get triggered on one of 
> the models? Of course I could set up the association itself to be eager 
> loading, but I'd like to avoid it if possible. :/
> 
> Thanks,
> Roger
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to