Hi,
Regrettably, there is no such functionality in Kentico CMS like you described. By default, search results are ordered by Lucene .NET relevance (score), but you can order the search results by some custom logic or custom field in search result web part settings.
You can either use some general document field (from CMS_Tree or CMS_Document tables) or document type field (in this case all document types involved in the search results would need to have field with the same name, so that you can order them based on this field) where you can keep your expressions like "legal".
However, when ordering according to custom field or some general field, you will lose the relevance (score) order.
Maybe it might be worth to reorder the results programmatically in the smart search result control file (~\CMSModules\SmartSearch\Controls\SearchResults.ascx.cs) where you can access any document information returned by smart search and based on such information move the document which you would like to have as the first one in the list in the resulting DataSet.
Searching in document attachments (pdf, txt, docs files etc.) is supported as described in the documentation:
http://devnet.kentico.com/docs/5_5R2/devguide/searching_attachments.htmThe only requirement here is that the attachments need to be stored on database level and SQL Server needs to be configured to use full text search over CMS_Attachment table (AttachmentBinary column).
Basically, if you would follow the documentation, you will achieve what you are looking for.
Thanks,
Miro