Hi,
I am trying to make use of the :time_segments option to search for
most recent blog posts and would like to do something like:
class Post < ActiveRecord::Base
has_many :comments
define_index do
# no indexes comments.body since I'd like to search for comments
separately
indexes body
has "GREATEST(posts.created_at, MAX(comments.created_at))", :as
=> 'last_active_at', :type => :datetime
group_by 'posts.id'
end
end
However that fails, since I don't see a good way to specify that the
resulting query should join on the 'comments' table. Is it possible to
specify that join?
Thanks,
-- Dmitry
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---