XF 2.0 CRUD Hooks for Algolia Search

Hi All,

Using XF2 Beta 5

I'm new to Xenforo so please bear with me.

We are using Algolia on our publishing site (in development) and would like to port it to XF. I do appreciate that there is an Elasticsearch option, but Algolia better suits our needs.

Question is, how would we go about hooking into CRUD operations for threads, users, messages, media etc? We have the server side code working well on our publishing site based on Algolia's WP plugin, so am hoping it wouldn't be too difficult to use what we already have for writing to Algolia, but modified to hook in XF CRUDs.

We don't need any front end code (or minimal) as we intend using our JS front end from the publishing site - although we may decide to integrate what we have with the existing search UI (undecided).

So how easy would this be? I am hoping we could mod something that already exists, or if it's outside of our skillset, would be prepared to pay for the server side code/plugin.

Any help would be appreciated.

Chris
 
The way the search system is designed is that it's split into two distinct pieces. There's the search "data handler" side which deals with different content types, e.g. threads, messages and media. Then there's the search "source handler" which deals with the actual API of whatever search system you want to use. So, by default we include a source handler for MySQL full text search. Our Enhanced Search add-on doesn't do much more than add a new source handler for the Elastic search software.

The point of what I'm trying to say is that the data handler doesn't care what source handler you use, it's totally agnostic. Which means if you want to introduce a new source handler (like Algolia) then you don't need to worry about hooking into how threads, messages, media etc. are indexed, you just concentrate on adding a new source handler; the XF system will take all the information from all the content types, it will prepare it and wrap it up into a nice format which then the source handler receives to then do the search system-specific stuff like how to actually perform a search in Algolia etc.

Although I appreciate it's an additional cost, it might be worth you getting a copy of the XF Enhanced Search add-on so you can see in isolation the "right way" to add a new source handler, how to activate it in XF, how to configure it and ultimately how we approached writing the source handler itself.

That's the approach we'd recommend then if you get stuck you can ask specific questions here. Certainly it will be a good test to see how people get on with implementing a custom source handler. As we're still in beta if there are any short falls in our approaches or we need to bake in any additional flexibility then now's a good time to do that.
 
Many thanks. I did see this last week but didn't have time to get back to you.

Yes might consider buying the add on, although to make sense of it, I guess it'd be best to plug it in to ES and by the time we've done that... etc.

Let's think on it - I might see if there's any takers for some paid work.
 
Top Bottom