It feels a little weird to me to use CommentThread.index_name here, since it's for both CommentThread and Comment. It might be better to define a constant in content.rb.