Algolia split integration

Just doing some testing to potentially integrate Algolia as backend search for our customers. The content to be searched actually resides on 3 different end points - Wordpress website, AngularJS docs site, and end user community site. Getting Wordpress setup was simple using the Plugin – content was auto indexed and loaded into Algolia. I am trying to find a clean method to load the docs site, and happened upon Docsearch, which appears to do what is needed, but this appears to be offered as a free service, which is not connected with my Algolia account. I am assuming that, for the Wordpress site search, any indexes or data on Algolia will be searched, and results presented. If the DocSearch data is available, but not in our Algolia account, not sure how to get a single search box that can access both the WP plugin generated indexes and content provided by Docsearch. Any ideas? Let me know if I missed something.


Hi @dhockenberry,

Sorry for the late reply here, we definitely missed this one.

I will quickly loop in with the DocSearch team to see how we could possibly re-use the existing index.

Please bear with me.

Hey again @dhockenberry,

As you correctly mentioned, indices populated by DocSearch are on a dedicated app.
That would normally not be an issue to integrate in in the autocomplete.js dropdown, however in the case of DocSearch, the record structure is very specific, making it really hard to integrate with autocomplete.js.

As a result, I would not recommend you try to integrate the DocSearch results in the same dropdown as other content.

However maybe creating some kind of “search switcher” where you could select either to search in docs or other content could maybe to the trick.

What do you think?

I understand that your goal is to merge 3 different indices in the same search experience (page).

Given you are willing to merge 3 indices that have different structure for records and also different

What you could do though is create 3 different instantsearch implementations, and allow users to switch between them using a tab.

You already have the default wordpress one.
For DocSearch, here is a fiddle:
For the last one, you could inspire from the other ones.

Be careful to adapt the example to WordPress, given it is using wp-util template (underscore template) instead of Hogan.

I hope that helps.

Let me know if you manage to leverage those inputs.