How can I change the URL for an indexed PDF?

api

#1

I need to index a PDF on a domain (Amazon S3), such as:

http://mypdflib.aws.amazon.com/test.pdf << not a real link

However, I want the search results to link a PDF viewer page on my main site:

http://mysite.com/pdf-viewer/?file= http://mypdflib.aws.amazon.com/test.pdf

How can I accomplish this?


#2

Hey Seth,

Great question! This is something you could accomplish by writing a custom function to affect the defaultOnComplete behavior within our jQuery client libraries.

By writing a conditional that first parses the result URL and looks for those that end in .pdf, you could then prepend the url output to include the http://mysite.com/pdf-viewer/?file= structure.