Discourse Algolia Search

:discourse2: Summary Discourse Algolia Search integrates Algolia with Discourse search.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-algolia
:open_book: Install Guide How to install plugins in Discourse

Features

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

You can find the Github repository, complete with installation instructions, on github at 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, which is free up to 10,000 records.

Configuration

:raising_hand_woman: 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 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 and mention Discourse.

CHANGELOG

2022.11.02

Pushed PR

  • 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

  • It should fix the bug where the search box stopped working after multiple page loads. :warning: 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. :warning: 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 documentPerform check on document:
62개의 좋아요

플러그인이 자동으로 재인덱싱하는 것 같습니다. 얼마나 자주 수행되는지 아시는 분 계신가요? 관련 문서를 찾을 수 없네요.
감사합니다.

1개의 좋아요

커뮤니티에서 누군가 답변을 알지 않는 한, 이 문제에 대해 Discourse 팀으로부터 답변을 받는 데 다음 주까지 걸릴 수 있습니다.

해당 플러그인이 인덱싱 대기 중인 모든 객체(게시물, 토픽, 사용자, 태그)를 처리하기 위해 5분마다 작업을 실행하는 것을 확인했습니다: discourse-algolia/app/jobs/scheduled/update_indexes.rb at main · discourse/discourse-algolia · GitHub. 하지만 객체가 다시 인덱싱되는 원인이 무엇인지는 저에게 명확하지 않습니다.

답변해 주실 기회가 있으시다면, 콘텐츠가 다시 인덱싱되고 있는 것처럼 보이는 것이 무엇인지 궁금합니다.

1개의 좋아요

시몬, 답변해 주셔서 감사합니다! 테스트 게시글을 하나 만들었습니다. 저희는 Algolia 계정이 있습니다. 그래서 다음 날 로그인해서 Algolia 관리자 화면에서 해당 게시글을 검색해 보니 검색 결과에 표시되어 있었습니다. 게시글을 작성한 직후 바로 확인했는데, 그때는 Algolia에서 게시글이 보이지 않았습니다. 색인 처리 중에는 어떤 지연이 발생할 수밖에 없다는 점은 이해하고 있습니다. 5분 정도면 꽤 괜찮은 수준이겠죠. 다른 게시글을 하나 더 작성하고 10분을 기다린 뒤 검색해 보겠습니다. 문서에 이런 내용이 언급되어 있지 않은 것이 좀 놀랍네요.

2개의 좋아요

방금 이 플러그인을 테스트해 보았습니다. 몇 가지 질문이 있습니다:

  1. 키워드를 검색할 때, Algolia는 동일한 토픽의 서로 다른 단락만 나열하고 있습니다. Discourse가 고유한 토픽을 표시하는 방식과는 다릅니다. 해당 토픽이 궁극적인 답변이 아닌 한, 이 방식은 최종 사용자에게 더 제한적이고 부정확해 보입니다. 이 동작을 설정할 수 있어야 하지 않나요?

  2. 이 플러그인은 posts, tags, users 유형 각각에 대해 Algolia 앱에 3개의 인덱스를 생성합니다. 내 Algolia 앱에서 사용할 수 있는 다른 인덱스를 이 플러그인에 포함시키는 방법은 무엇인가요? 사용 사례: Algolia를 통한 멀티사이트 검색

마지막 질문은 기능 요청에 가깝지만, 첫 번째 질문은 사용 가능한 검색 결과를 위해 설정 가능한 옵션이어야 한다고 강력히 생각합니다.

1개의 좋아요

안녕하세요,

자동완성 검색이 모바일에서도 작동하나요? Algolia 포럼에서 제대로 작동하는지 확인이 안 되네요.

안녕하세요,

Algolia 커뮤니티는 더 이상 사용되지 않으며 Discord로 이전되었습니다.

Saying goodbye to our Discourse forums (and what comes next) - Algolia Blog | Algolia

또한, UX 디자인이 변경되었습니다. 훨씬 더 현대적으로 보입니다. 플러그인을 업데이트할 계획이 있나요?

그리고 "로그인"과 “가입” 버튼을 오른쪽 구석(기본값)으로 이동하고, “Header Search” 테마 구성 요소처럼 검색창을 가운데에 배치하는 것이 가능한가요?
direita

2개의 좋아요

현재로서는 구체적인 계획이 없습니다. 이 플러그인을 사용하는 고객이 매우 적기 때문입니다.

3개의 좋아요