简体   繁体   中英

How to include associations in thinking sphinx rails

Using thinking-sphinx to fetch records and it works fine. But the issue is that I want to fetch associated records also in results to improve site performance.

Like I want to fetch pictures of articles also along with articles .

Tried this one but its not working

 Article.search :include => [:pictures]

How can I do that?

Thinking Sphinx v3开始:include选项现在位于:sql选项中:

Article.search :sql => {:include => :pictures}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM