How to enable searching inside Google Drive/Docs using Spotlight?

I used a version of the answer supplied here with sudo mdutil -E /Volumes/[DriveName] but first I had to make sure the Google Drive was mounted. So I did this:

sudo defaults write /Library/Preferences/com.google.drivefs.settings DefaultMountPoint '~/GoogleDrive'

Source: Configure Drive File Stream

It's very important that you don't put a space between Google Drive, as shown in the Google support column, because Terminal takes this as a hard return when entering the index command.

Then restart the Mac so the Google Drive is mounted as GoogleDrive, then:

sudo mdutil -E 

Source: Terminal 101: Rebuild the Spotlight Index On the Fly


I don't believe that Spotlight is technically able to index the content inside the Google Drive files, at least not files that were created from within Google Drive's web interface. For example, if I go to drive.google.com and create a new file (e.g. a Document) and insert some content (text) in the document, that new file representing that document will show up in my Mac's directory (i.e. /Users/myname/Google Drive/filename.gdoc). However if I take that file and open it in a text editor, I can see that the only content in the file is a link to the online file and some other information. The actual content of the google document is not in the file that's on my computer. Since the content of the document isn't in the file that's on my computer, there's nothing for Spotlight to index.

I think this is really unfortunate. The idea that I could use Spotlight to search through all of the files that I created online is really great, but it appears that Google Drive isn't downloading the content of the files, so there is nothing for Spotlight to index. As you noted Precipitate provided that functionality, but it doesn't work any more and it's no longer developed.

One non-spotlight alternative is to use the app Alfred to search:

Google Drive Search with Alfred App

All this really is is a shortcut to open your google drive in a web browser and initiate a search- not really what you (or I) want.

There is also an app called Found that is able to search Google Drive, but that company was purchased and the app is no longer being developed. I haven't tried the most recent version (which is from 2013), and the reviews on macupdate.com are mixed about its current functionality, but it might be worth a try.