Renamed Document class to SearchDocument to avoid conflicts with a common class name for upload/attachment classes when using the Paperclip or other file upload gems.