Avoid download 100.000 mails from gmail when using Apple Mail When I am using Apple Mail, it insists on downloading the full body and attachment 100.000+ email I have on gmail, which eats up my hard drive, and makes the interactive search function annoyingly slow.

Is there any way to make Mail only create indexes for Subject/From fields, and keep all the actual mail content remotely?

Possibly, it could cache "new" mail locally (from the last week or so), but to cache the full body of every single mail from years ago is just insane with the amount of mail one has these days.
Apple's mail on 10.11 and older will download all the mail that the server tells it about. The macOS 10.12 mail has a setting to optimize mail storage that might store header information for all mails, but not download the body and attachments of older emails. 

You can opt in to that from the Apple menu - about this Mac - storage - manage, but it seems to only be offered when you have significant storage burden from Mail and/or specific mail server configurations.

Since that's how the mail client was designed and codes, you will need to go to gmail's web interface and hide some of the folders from IMAP access to prevent mail from ever seeing the messages. Exchange has a setting to determine a time range of mail to sync, but google and IMAP do not have that feature.

Gmail -> Settings -> Labels

Most people I know that use mail like you describe (keep all of it all the time) choose to not show All Mail in IMAP and then just clean their inbox when the volume becomes unwieldy.