[ts] Fields in results

112 views
Skip to first unread message

Richard

unread,
Apr 15, 2010, 7:58:56 PM4/15/10
to Thinking Sphinx
Say I have an field from an associated model, is it possible to have
the field match(es) returned with the results?

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To post to this group, send email to thinkin...@googlegroups.com.
To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Pat Allan

unread,
Apr 23, 2010, 3:40:48 AM4/23/10
to thinkin...@googlegroups.com
The only way to figure out which fields match the given query is to use the rank mode of fieldmask:
http://freelancing-god.github.com/ts/en/searching.html#ranking

And then in each search result, you can get the field details from the matching_fields method (unless there's a method of the same name already defined on the model).

Keep in mind you'll need the latest TS and Sphinx 0.9.9 proper or rc2.

Hope this helps

--
Pat
Reply all
Reply to author
Forward
0 new messages