Quote from: jisaac at May 12, 2010, 01:06 PM
Will the links created by your snippet be found in a AjaxSearch search? Because that really is the main goal. To have a visitor locate a file along with other docs when running a site search.
TBH, I’m not sure. I’ve never used AjaxSearch. If the page is cached and AjaxSearch searches the cache, it would be found -- otherwise not because the links are created dynamically and would not be in the DB.
If AjaxSearch does search the cache, the FileDownload snippet would still almost certainly be a better choice. If it doesn’t, your only choice (short of creating a document for each file) would be to create a custom search function that reads the directory(s) into an array, searches the array, and creates the appropriate links. Not a trivial job, but it could definitely be done.
I guess you could also create a custom DB table containing each file name and a link to it (and maybe a few key words from the content) and search that, although keeping it up to date might be a challenge.