inetis-ch/oc-CustomGoogleSearch-plugin

how to search for files?

Closed this issue · 1 comments

Hi,

I have created a secure user page with files like pdf and word.
for this, I use the Jan Vince small records plugin.
your search function plugin works great for text but I can't find any files.
Can you help me how to find the files to?

Hi, the important thing to understant with this plugin is that it doesn't search for pages or files itself, it only displays stuff that Google is able to crawl.

This is nice because Google is very good at extracting text from various files (if I remember correctly it even runs an OCR on PDFs containing images).

But the downside is that if a file is not indexed by Google it won't appear in the search results. This can appen for various reasons, for example:

  1. The file is not publicly accessible, either because it is blocked by a robots.txt or viewing it requires to be logged in (so Google is not allowed to view it)
  2. The file is not referenced in any public page (Google doesn't know that it exists)
  3. Google may also decide that the content of the file is not "valuable" enough to match a search query (I am not an SEO expert but I suppose this can happen)
  4. Also, depending on how often Google crawls your site, it may take some time to discover new files

Maybe an idea of solution if the problem is related to discoverability of the files would be to create an XML sitemap containing your files and send it to Google so it can know that it has to index them.