journalduhacker/app/indices/comment_index.rb

13 lines
327 B
Ruby
Raw Permalink Normal View History

2014-01-07 11:52:29 +01:00
ThinkingSphinx::Index.define :comment, :with => :active_record do
indexes comment
2014-09-12 17:42:22 +02:00
indexes short_id
2014-01-07 11:52:29 +01:00
indexes user.username, :as => :author
has Comment.score_sql, :as => :score, :type => :bigint, :sortable => true
2014-01-07 11:52:29 +01:00
has is_deleted
has created_at
where sanitize_sql(:is_deleted => false, :is_moderated => false)
end