Search files outside WordPress?

I have a client hoping to transition off of Google Site Search. They require the ability to search from within WordPress, but get results including PDF files which are outside the WordPress install. Can algolia accommodate this kind of search?

Hi Lissa,

Just to clarify, you’re looking to have the search page on a WP-powered website, but the index will be occupied with results that are outside of that WP instance?

If so, yes - it’ll take some custom development but this is possible.

Hi Jason,

Yes, WordPress drives the site, but is not installed in the site root. The client has a lot of PDF publications that we stored outside the WordPress folder. They want to be able to search from their site pages, which are handled by WordPress, and still retrieve those PDF files in other folders, in addition to the content in WordPress.

What kind of custom development?

As far as PDFs go, there are some considerations you should know about. For indexing PDFs, you’ll have to extract the textual content out of them and index that.

For the custom development - out of the box, our WP plugin’s search points to the indexes created by the Plugin. To satisfy your requirements, you’ll want to point the search experience to your custom indexes. Our WP plugin is open sourced.

Did you get this working? I’m trying to do something similar, but I’m stuck on the

you’ll want to point the search experience to your custom indexes

How is this achieved? I’m currently using the WordPress plugin and it will only look at the searchable_posts index. How do I get it to look at multiple indices?

1 Like

Hi @tim.ottewell

I’m no familiar with Algolia’s WP plugin but I believe it’s using Instantsearch.js to perform search on the index coming from WP content.

You have the doc of this plugin here so you’ll be able to see quickly how to plug an other index.

I would say that you then can use some connector-s to intercept the hits from both indices if you want a really custom integration for results but someone from Algolia might give you something simpler.

Hope this help :wink:

1 Like