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
|
|
|
|
|
2015-01-28 22:02:40 +01:00
|
|
|
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
|