Fixed indexing to work with new Attachment model.
Fixed search view to work with new Attachment model.