WPFTS does not index files NOT uploaded with Media Library
-
I use Simple File List Pro from Mitchel Bennis. Files are uploaded to a directory structure in wp-content/uploads/simple-file-list.
In the wp-content/uploads/simple-file-list there are folders, used as categories. For Example wp-content/uploads/simple-file-list/newsletters.
Newsletters are PDFs in that directory.But when i do a search on a certain word in 1 of the newsletters, the PDF does not show up in search results.
When i simply upload it to the wp-content/uploads/ with the Media manager from Wordpress, the newsletters does show up in search results.Am i right in thinking that WPFTS does not index files NOT uploaded with Media Library?
Can i make WPFTS index the /uploads/simple-file-list/ ?Your help will be appreciated
-
The main problem is that WPFTS basically works with database entries in the wp_posts table, not with physical files. The files are the source of the search text only at the time of the indexing procedure, and thereafter the index only references the rows in the database table. It works this way because WPFTS is essentially an extension of the standard WordPress function, WP_Query, which searches wp_posts records.
What I might suggest in your case?
-
Since Simple File List Pro does not save information to WP Media Library, we need another plugin that will populate wp_posts with information about each file. In this case, with a small addon, the WPFTS plugin can index each file and display it in the search results (every file).
-
Another option is to index files that are embedded in the page using the [eeFSL] shotcode. But in this case it will be impossible to highlight a single file in the search results - instead a link to the page itself, where the list of files is embedded, will be displayed.
I need to understand exactly what you need in order to give further instructions or advice. Please let me know.
-
-
@EpsilonAdmin I find myself also in this exact situation.
A small web site that is primarily about displaying a hierarchy of folders that contain mainly PDFs - using Simple File List Pro
I have only 3 top level pages. Everything else is generated auto-magically by SFLP when it scans the folders into which I have uploaded files manually (via CyberDuck)
using the eeFSL shortcode won't help if it simply results in one of those 3 pages being returned in search results.Screenshot attached that hopefully gives an idea of what I have.
So, can WPFTS be enhanced to:
a) be pointed at a top level folder & told to index all files within that hierarchy; or
b) leverage the index that is created by SFLPIf getting this done would be helped by having access to my site feel free to let me know.
-
Hi @Graham
Thanks for your question. Let me ask you one more clarifying question before I can offer a solution.
You plan to use the widget for general site-wide search, right? If so, and in this case, if the information is found in one of these files that are listed in your example, then what exactly should be displayed on the search results page? And in this case, where should the user go when he clicks on the title of the search results element?
-
@EpsilonAdmin Thanks for quick response and question.
Yes, my hope was to use the standard WP search widget - but I haven't explored any other option. If there's a better way I'm happy to get guidanceMy site has been recently re-created in WordPress after quite a few years of running under Joomla and that Joomla installation had a free plugin called jiFiles (?) which did the document scanning/indexing. A standard search, scoped on file name or a string from within file content, would pull up a list of file names each hyperlinked to the file itself to easily click on for in-browser viewing (or possibly downloading).
I appreciate that there are other WordPress plugins that offer a full document management system but they have a much larger feature set than I need and are also majorly expensive for a small non-profit community web site.