Since Solr is nonrelational, nested subqueries of the type you'd find
in MySQL etc. aren't a possibility. Instead, you'll want to solve the
problem at index-time:
class Mesage
after_save do |message|
if message.parent.nil? then message.solr_index
else message.parent.solr_index
end
end
searchable :auto_index => false do
text :content
text :reply_content do
replies.map { |reply| reply.content }
end
end
end
Hope that clears things up!
Mat
> --
> You received this message because you are subscribed to the Google Groups "Sunspot" group.
> To post to this group, send email to ruby-s...@googlegroups.com.
> To unsubscribe from this group, send email to ruby-sunspot...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruby-sunspot?hl=en.
>
>