index most expandable attachments, fixes #331
fix encoding before indexing