I gave it some more thought and I think this is really just a display issue. It's just a matter of what extract/match to display (what to highlight). Right now, when you search for documents (default setting) I'm using this priority list to look for the first document 'field' that has an extract/match:
['doccontent', 'comment', 'objcontent', 'attcontent']
So if a document is returned because the search keyword is found (only) in the comments then the extract will be displayed from the 'comment' field. Same if the keyword is found in objects or attachments. The raw content should not be handled differently. It's just another document 'field'. So as long as we don't have an option to search (only) in document content and not in its comments, objects or attachments then I don't think we should have a dedicated option to search (only) in the rendered document content and not in its raw content. You can always use the boost input if you want to search in some particular field. What we need to do is just display the raw content extract/match when a rendered version is not available. This means simply using:
['doccontent', 'doccontentraw', 'comment', 'objcontent', 'attcontent']
This way, if the keyword is found in the rendered content then the extract for the rendered content will be displayed. If the keyword is found in the raw content but not in the rendered content then the raw content extract will be displayed. And so on for comments, objects and attachments. There's no need for a raw/rendered content switch.