# Discourse Algolia Search

**URL:** https://meta.discourse.org/t/discourse-algolia-search/73517
**Category:** Plugin
**Tags:** official, algolia-search
**Created:** [November 6, 2017, 2:36pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517 "2017-11-06T14:36:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [November 6, 2017, 2:36pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/1 "2017-11-06T14:36:07Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Algolia Search** integrates Algolia with Discourse search. |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-algolia](https://github.com/discourse/discourse-algolia) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

> [@](#):
>
> :discourse2: As this is an #official plugin maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate plugin tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&body=%3E%20Before%20asking,%20did%20you%20search%20first%3F%20Press%20%F0%9F%94%8D%20at%20the%20upper%20right%20to%20search.&tags=algolia-search "Ask for support on configuring and using Discourse Algolia Search") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=algolia-search "A bug report means something is broken, preventing normal/typical use of the plugin") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=algolia-search "Discussion about the user interface of Discourse Algolia Search, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=algolia-search "Discussion about how existing Discourse Alogolia Search features can be improved or enhanced, and how proposed new features could work")

### Features

I’ve recently created a plugin that indexes topics, posts, users and tags with [Algolia](https://algolia.com/) and combines them into a multi-category autocomplete search. Here’s a GIF of how it works:

 ![discourse-algolia](https://global.discourse-cdn.com/meta/original/3X/5/2/52194770414dbf5df12b2068c1ef63fea5433a36.gif)

You can find the Github repository, complete with installation instructions, on github at [algolia/discourse-algolia](https://github.com/algolia/discourse-algolia).

Plugin configuration just requires populating a few fields. Indexing tasks are put in the jobs queue after objects are saved. Note: you will need to [create an Algolia account](https://algolia.com/users/sign_up), which is free up to 10,000 records.

 ![algolia-plugin-config](https://global.discourse-cdn.com/meta/original/3X/0/3/0353f88abc8e3536b06e6e32c76e789973839414.png)

### Configuration

#### 🙋‍♀️ FAQ

**Q: Does this replace the default Discourse search?**  
A: Only if you want it to, and right now only for the autocomplete in the header. The full search page is still reachable by hitting the enter key without a search result selected, or by using the “advanced search” link in the autocomplete footer. I say “only if you want it to” because you can enable indexing to Algolia but not affect the UI or existing Discourse search in any way - that’s why there are two checkboxes in the plugin settings. If you’re just doing indexing, you can search the data in your Algolia dashboard to see how it’s working.

**Q: Do I have to pay to use the plugin?**  
A: It depends on how much data you have. If you have less than 1k posts, you should fit into Algolia’s free Community Plan, which gives you 10k records. A good rule of thumb is that you’ll need 10 Algolia records for each post, as posts are split up into-paragraph size chunks for optimum relevance and speed. Still, YMMV. If you’d like to use the plugin but have concerns about the cost, just send me [an email](mailto:josh@algolia.com?subject=discourse-algolia) and I’ll see what we can do. _If you are an open source project or a non-profit, you may quality for higher limits, just [fill out this form](https://www.algolia.com/for-open-source/) and mention Discourse_.

### CHANGELOG

> **2022.11.02**
>
> Pushed [PR](https://github.com/discourse/discourse-algolia/pull/66)
> 
> - Updated algoliasearch.js to 4.14.2
> - Updated autocomplete.js to 1.7.1
> 
> * * *

> **2020.09.08**
>
> Pushed 8 commits to [GitHub - discourse/discourse-algolia: A plugin for indexing and searching your Discourse with Algolia · GitHub](https://github.com/discourse/discourse-algolia)
> 
> - It should fix the bug where the search box stopped working after multiple page loads. ⚠ NOTE: **the plugin needs the very latest version of Discourse to work**
> 
> - The plugin is now using Discourse scss variables, and will now work correctly in Dark mode
> 
> - Fixed a bug where user search was leading to /users instead of /u and would result in a 404. ⚠ NOTE: You will need to reindex users for this to work correctly `rake algolia:reindex_users`
> 
> - Fxed an alignment issue of the searchbox
> 
> - Applied various coding standards
> 
> - Removed part of the jquery usage
> 
> - Searchbox should be slightly faster, as it’s now tied to rendering instead of arbitrary 100ms wait (also removed the forbidden setTimeout usage)
> 
> * * *

### TODO

#pr-welcome for the following tasks:

- update algoliasearch (ruby)

This would ensure we are not deprecated in the future and allow to import libraries instead of having it in global namespace.

> Last edited by @awesomerobot 2025-03-10T20:32:59Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![kgarrison](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgarrison/32/142417_2.png) [@kgarrison](https://meta.discourse.org/u/kgarrison)
#### Post date: [September 15, 2023, 3:46pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/84 "2023-09-15T15:46:38Z")

</div>

The plugin seems to auto reindex. Can someone tell me how often it does this? I don’t see any documentation about it.  
thanks

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [September 18, 2023, 9:50pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/85 "2023-09-18T21:50:17Z")

</div>

Unless someone in the community knows the answer, it might take until next week to get an answer from the Discourse team about this.

I see that the plugin runs a job every 5 minutes to process all objects (posts, topics, users, tags) that are queued to be indexed: [discourse-algolia/app/jobs/scheduled/update\_indexes.rb at main · discourse/discourse-algolia · GitHub](https://github.com/discourse/discourse-algolia/blob/main/app/jobs/scheduled/update_indexes.rb). It’s not clear to me what would cause an object to be reindexed though.

If you have a chance to respond, I’m curious about what you are seeing that makes it seem that content is being reindexed.

---

<div class="post-metadata">

### Author: ![kgarrison](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgarrison/32/142417_2.png) [@kgarrison](https://meta.discourse.org/u/kgarrison)
#### Post date: [September 18, 2023, 10:15pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/86 "2023-09-18T22:15:08Z")

</div>

Hi Simon, thanks for the reply! I created a test post. We have an Algolia account. So the next day I logged in and did a search for that post within the Algolia admin and it was showing up. I believe I had checked immediately after posting and didn’t see the post in Algolia. But understand there must be some kind of delay while indexing. 5 minutes would be pretty good. I can try another post and wait 10 minutes to see if its there. I’m surprised there is no mention of this in the documentation.

---

<div class="post-metadata">

### Author: ![gormus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gormus/32/428592_2.png) [@gormus](https://meta.discourse.org/u/gormus)
#### Post date: [January 12, 2024, 9:17pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/87 "2024-01-12T21:17:13Z")

</div>

I just started testing out this plugin. A couple questions:

1. When I search for a keyword, Algolia is only listing different paragraphs from the same topic, instead of how Discourse shows unique topics. Unless that topic is the ultimate answer, this method seems more restrictive and inaccurate for the end users. Should this behavior be configurable?

2. The plugin creates 3 indices in the Algolia app one for each `posts`, `tags` and `users` types. How could I have this plugin to include other indexes that are available in my Algolia app. Use case: Multi-site search via Algolia

The last one is more like a feature request, but I strongly believe the first one needs to be a configurable option for usable search results.

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [February 25, 2024, 11:42am UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/88 "2024-02-25T11:42:40Z")

</div>

Hi,

The autocomplet search IS also working for mobile? I cant see it’s working on the algolia forum

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [September 8, 2024, 12:30pm UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/89 "2024-09-08T12:30:29Z")

</div>

> [@Discourse](#):
>
> You can find the Github repository, complete with installation instructions, on github at [algolia/discourse-algolia](https://github.com/algolia/discourse-algolia).

hey,

the Algolia community is no longer available, they migrated to discord

[Saying goodbye to our Discourse forums (and what comes next) - Algolia Blog | Algolia](https://www.algolia.com/blog/algolia/saying-goodbye-to-our-discourse-forums-and-what-comes-next/)

also, the UX design has changed. Looks + modern now. Is there any plans to update the plugin?

and It is possible to move the “login” and “registration” buttons to the right corner (as default) and center the search bar, just like in “Header Search” theme component?  
 ![direita](https://global.discourse-cdn.com/meta/optimized/4X/6/b/d/6bd974a2ecd40f0f0c948276ca65d3cfbdbd4800_2_689x27.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [September 9, 2024, 1:40am UTC](https://meta.discourse.org/t/discourse-algolia-search/73517/90 "2024-09-09T01:40:29Z")

</div>

> [@David\_Ghost](#):
>
> also, the UX design has changed. Looks + modern now. Is there any plans to update the plugin?

Nothing concrete at the moment, we only have very few customers using this plugin
