I wrote a nice routine that allows me to get file Ids of 200 PDF files (uploaded some minutes ago onto my Google Drive) and setValue
of a Google Sheet with those Ids.
In order to get the correct file Ids, it searches the content of the PDF.
The issue is that some days the content is searchable 5 minutes after uploading the 200 PDFs, and other days it takes up to 7 hours.
Is there a way to track the indexing status?
Is there a way to force a specific folder on Drive to be indexed with priority?
Best Answer
To know if a file is indexed look at the
contentHints.indexableText
property by using the get method from Google Drive REST API.AFAIK Google Drive doesn't include any way for end users to force a specific folder to be indexed with priority.
It's worth to say that on contrary of other filesystems, in Google Drive folders are not related to the physical location of files on Google's servers, they are just a way to help users to organize files in a way that is comprehensible by most of them.
References
Quotes
From https://developers.google.com/drive/v3/web/file#saving_indexable_text