Add Algolia search to your Discourse


(Jesse Perry) #21

I thought the 2.0 post rebake was automatic? I guess I thought wrong - where are the instructions to go through that process?


(Magnetidog) #22

Hey Jesse, no worries - do not touch anything. Our case was that we had done the import in a beta version of the forum, so we were forced to reimport them in the live forum when done.

Anyhow, there are further developments in the Github issue tracker which you can follow.

If you have the time Jesse, can you let us know your total post counts in Discourse and the size of the discourse_posts index in Algolia? Apparently it is normal for the post count to be three times the size of the post count, more or less, as the records are split in chunks for performance reasons. Needless to say this leads to much higher costs for larger forums.

We also had another issue with our import - the tool restarted at least once automatically due to the size of the post table and the memory available in our installation. But we are investigating this.


(Josh Dzielak) #23

@Magnetidog thanks for trying out the plugin and opening the Github issue. Here’s the current summary for folks following along:

  • There’s no upgrade issue between 1.9 and 2.0, the record count difference was more likely due to a silent failure during indexing. Most users should have no issue upgrading.
  • The rake tasks need to be improved to be more performant and use less memory for larger forums, plus add a confirmation step to avoid accidental quota usage - tracking in #14
  • To avoid creating too many Algolia records per post, we will chunk posts by a set number of bytes instead of by paragraph - tracking in #15. For many posts this will lead to a 1:1 ratio of posts to records.

(Alessio Fattorini) #24

Oh wow, great plugin. I love it


#25

Is the search enabled for mobile view?

It doesn’t appear to be loading on mobile devices, I’m guessing due to the logo and hamburger icon that creating size constraints. Any chance of enabling an icon that creates a popup/dropdown?


(Josh Dzielak) #26

@supernaturally currently the search is hidden on mobile. The plan is to improve that, and you can follow along on this Github issue:


#27

Great! Thanks @dzello


(Alessio Fattorini) #29

@dzello we are a open source project and I have some issues with the search, No data showed


(Sevos) #30

I have the very same issue. That’s weird - since 2017 no any commits on Github. I’m tryna solve this problem through their e-mail support, let’s see how it goes.


(Sevos) #31

They don’t maintain plugin which comes directly from Discourse and it’s available on Github under their account. But here is some suggestion from Algolia:

The issue is still related to the fact that the settings didn’t persist to your script. You can see that by the fact that there’s no api key or app id in the logs

The SiteSetting.algolia_application_id is .

Should have been

The SiteSetting.algolia_application_id is XXXXXXXXXX.


(Sevos) #32

Allright, guys. I already solved this problem with help on Algolia Forum (here)

Instead of

LOAD_PLUGINS=1 bundle exec rails algolia:initialize

You just have to use this:

LOAD_PLUGINS=1 rails algolia:initialize

Have fun :wink: I’ll send pull request on Github later.